diff --git a/HACKING b/HACKING index fc9e97e94a..e2ea805889 100644 --- a/HACKING +++ b/HACKING @@ -168,35 +168,9 @@ there is e.g. an extensive section related to window management). Coding style: ============= -There are these rules for patches for KWin: +KWin follows the kdelibs coding style. See: http://techbase.kde.org/Policies/Kdelibs_Coding_Style -- the code should be relatively nice and clean. Seriously. Rationale: Any messy code can be hard to comprehend, -but if the code is in a window manager it will be twice as difficult. - -- unless the functionality of the code is obvious, there should be either at least a short comment explaining -what it does, or it should be obvious from the commit log. If there's a hack needed, if there's a potentional -problem, if something is just a temporary fix, say so. Comments like "this clever trick is necessary" -don't count. See above for rationale. I needed more than two years to understand all of KWin, -and there were parts I never got and had to rewrite in order to fix a problem with them. - -- indentation is 4 spaces, not tabs. Rationale: The code looks like a mess if this is not consistent. - -- { and } enclosing a block are aligned with the block, neither with the above level nor there is any -trailing { (i.e. { and } are indented in the same column like the code they surround). See above for rationale. -If this feel weird or whatever, put them wherever you want first and when the changes are done, check -"svn diff" and fix it. If I can handle about half a dozen different formatting styles when working -on various parts of KDE, this shouldn't be that much work for you (and yes, I've even done -the "fix-before-submit" thing). - -- there is not space before (, i.e. it's "foo(", not "foo (". Rationale: This makes it simpler to grep for functions. - -- a null pointer is NULL, not a zero. Not that I really insist on this one, but the only reason for using 0 -is being way too lazy to type. Rationale: NULL says it's a pointer, and with many compilers it actually is a pointer, -making it possible to detect some mistakes. - -That's all. Bonus points if you try to follow the existing coding style in general, but I don't think -I really care about the rest, as long as these rules are followed. If I find out I care about more, -I'll add them here. +The source repository was reformatted with git commit 4fd08556a1702462335f4f1307da663c2c54b2c2 Branches: diff --git a/effects/invert/invert.desktop b/effects/invert/invert.desktop index 3189bf4430..5344ae22c7 100644 --- a/effects/invert/invert.desktop +++ b/effects/invert/invert.desktop @@ -125,7 +125,7 @@ Comment[nn]=Snu fargane på skrivebordet og vindauge Comment[pa]=ਡੈਸਕਟਾਪ ਅਤੇ ਵਿੰਡੋ ਦੇ ਰੰਗ ਬਦਲੋ Comment[pl]=Odwrócenie kolorów pulpitu i okien Comment[pt]=Inverte a cor do ecrã e das janelas -Comment[pt_BR]=Inverte as cores da área de trabalho e das janelas +Comment[pt_BR]=Inverte as cores das janelas e da área de trabalho Comment[ro]=Inversează culoarea biroului și a ferestrelor Comment[ru]=Инверсия цвета рабочего стола и окон Comment[si]=වැඩතල හා කවුළු වල වර්‍ණ යටිකුරු කරන්න diff --git a/effects/login/login.desktop b/effects/login/login.desktop index 6d08e38f49..ff9b981859 100644 --- a/effects/login/login.desktop +++ b/effects/login/login.desktop @@ -126,7 +126,7 @@ Comment[nn]=Ton inn skrivebordet ved innlogging Comment[pa]=ਜਦੋਂ ਲਾਗਇਨ ਕਰਨਾ ਹੋਵੇ ਤਾਂ ਹੌਲੀ ਹੌਲੀ ਡੈਸਕਟਾਪ ਨੂੰ ਫਿੱਕਾ ਕਰੋ Comment[pl]=Płynne rozjaśnienie do pulpitu podczas logowania Comment[pt]=Desvanecer suavemente para o ecrã ao ligar-se -Comment[pt_BR]=Suaviza o desaparecimento da área de trabalho ao fazer login +Comment[pt_BR]=Suaviza o desaparecimento da área de trabalho ao fazer a autenticação Comment[ro]=Estompează lin biroul la autentificare Comment[ru]=Плавное проявление рабочего стола при входе в систему Comment[si]=පිවිසීමේදී වැඩතලයට සුමුදු අවපැහැකිරීමක් ලබාදෙන්න diff --git a/effects/logout/logout.desktop b/effects/logout/logout.desktop index 9c3cfd7308..198adc72c6 100644 --- a/effects/logout/logout.desktop +++ b/effects/logout/logout.desktop @@ -126,7 +126,7 @@ Comment[nn]=Ton ut skrivebordet ved utlogging Comment[pa]=ਜਦੋਂ ਲਾਗ-ਆਉਟ ਡਾਈਲਾਗ ਵੇਖਾਉਣਾ ਹੋਵੇ ਤਾਂ ਡੈਸਕਟਾਪ ਨੂੰ ਡਿ-ਸੈਚੂਰੇਟ ਕਰੋ Comment[pl]=Zmniejszenie nasycenia kolorów podczas pokazywania okna wylogowania Comment[pt]=Reduzir a saturação do ecrã ao mostrar a janela de fim de sessão -Comment[pt_BR]=Reduz a saturação da área de trabalho ao mostrar o diálogo de logout +Comment[pt_BR]=Reduz a saturação da área de trabalho ao mostrar o diálogo de desligamento Comment[ro]=Desaturează biroul la afișarea dialogului de ieșire Comment[ru]=Плавное обесцвечивание экрана при выходе из сеанса Comment[si]=පිටවීමෙ සංවාදය පෙන්වන විට වැඩතලය අසංතෘප්ත කරන්න diff --git a/effects/taskbarthumbnail/taskbarthumbnail.desktop b/effects/taskbarthumbnail/taskbarthumbnail.desktop index e443586e17..02c16af57b 100644 --- a/effects/taskbarthumbnail/taskbarthumbnail.desktop +++ b/effects/taskbarthumbnail/taskbarthumbnail.desktop @@ -120,7 +120,7 @@ Comment[nn]=Vis miniatyrbilete av vindauge når peikaren er over ikona på oppg Comment[pa]=ਵਿੰਡੋ ਥੰਮਨੇਲ ਵੇਖੋ, ਜਦੋਂ ਕਿ ਹੋਵਰਿੰਗ ਟਾਸਕਬਾਰ ਐਂਟਰੀ ਉੱਤੇ ਹੋਵੇ। Comment[pl]=Pokazuje miniaturki okien, kiedy kursor znajduje się na ich pozycji w pasku zadań Comment[pt]=Mostrar as miniaturas das janelas ao passar sobre os elementos da barra de tarefas -Comment[pt_BR]=Mostra miniaturas das janelas quando o cursor passar sobre os itens da barra de tarefas +Comment[pt_BR]=Mostra miniaturas das janelas quando o ponteiro do mouse passar sobre os itens da barra de tarefas Comment[ro]=Afișează miniaturile ferestrelor cînd cursorul planează deasupra înregistrărilor din bara de procese Comment[ru]=Показывать миниатюру окна при наведении мышью на элемент панели задач Comment[si]=ක්‍රියා තීරු ඇතුළත්කිරීම් වලට ඉහළින් හැසිරෙන විට කවුළු කුඩා රූ පෙන්වන්න diff --git a/kwinbindings.cpp b/kwinbindings.cpp index fd23915a16..0a2c1fc290 100644 --- a/kwinbindings.cpp +++ b/kwinbindings.cpp @@ -122,6 +122,14 @@ DEF2("Window Quick Tile Left", I18N_NOOP("Quick Tile Window to the Left"), 0, slotWindowQuickTileLeft()); DEF2("Window Quick Tile Right", I18N_NOOP("Quick Tile Window to the Right"), 0, slotWindowQuickTileRight()); +DEF2("Window Quick Tile Top Left", I18N_NOOP("Quick Tile Window to the Top Left"), + 0, slotWindowQuickTileTopLeft()); +DEF2("Window Quick Tile Bottom Left", I18N_NOOP("Quick Tile Window to the Bottom Left"), + 0, slotWindowQuickTileBottomLeft()); +DEF2("Window Quick Tile Top Right", I18N_NOOP("Quick Tile Window to the Top Right"), + 0, slotWindowQuickTileTopRight()); +DEF2("Window Quick Tile Bottom Right", I18N_NOOP("Quick Tile Window to the Bottom Right"), + 0, slotWindowQuickTileBottomRight()); DEF2("Switch Window Up", I18N_NOOP("Switch to Window Above"), Qt::META + Qt::ALT + Qt::Key_Up, slotSwitchWindowUp()); DEF2("Switch Window Down", I18N_NOOP("Switch to Window Below"), diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index bc2856b27b..5455623bf7 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -1184,6 +1184,11 @@ GLShader *ShaderManager::loadShaderFromCode(const QByteArray &vertexSource, cons void ShaderManager::initShaders() { + // HACK: the generic shaders fail with NVIDIA's blob + // temporarily disable them to force kwin on GL 1.x profile + if (GLPlatform::instance()->driver() == Driver_NVidia) { + return; + } m_orthoShader = new GLShader(":/resources/scene-vertex.glsl", ":/resources/scene-fragment.glsl"); if (m_orthoShader->isValid()) { pushShader(SimpleShader, true); diff --git a/placement.cpp b/placement.cpp index a578803864..0f3d4d3926 100644 --- a/placement.cpp +++ b/placement.cpp @@ -700,6 +700,38 @@ void Workspace::slotWindowQuickTileRight() active_client->setQuickTileMode(QuickTileRight, true); } +void Workspace::slotWindowQuickTileTopLeft() +{ + if (!active_client) { + return; + } + active_client->setQuickTileMode(QuickTileTopLeft, true); +} + +void Workspace::slotWindowQuickTileTopRight() +{ + if (!active_client) { + return; + } + active_client->setQuickTileMode(QuickTileTopRight, true); +} + +void Workspace::slotWindowQuickTileBottomLeft() +{ + if (!active_client) { + return; + } + active_client->setQuickTileMode(QuickTileBottomLeft, true); +} + +void Workspace::slotWindowQuickTileBottomRight() +{ + if (!active_client) { + return; + } + active_client->setQuickTileMode(QuickTileBottomRight, true); +} + int Workspace::packPositionLeft(const Client* cl, int oldx, bool left_edge) const { int newx = clientArea(MovementArea, cl).left(); diff --git a/workspace.h b/workspace.h index 34ca651f21..fe97c776c4 100644 --- a/workspace.h +++ b/workspace.h @@ -764,6 +764,10 @@ public slots: void slotWindowShrinkVertical(); void slotWindowQuickTileLeft(); void slotWindowQuickTileRight(); + void slotWindowQuickTileTopLeft(); + void slotWindowQuickTileTopRight(); + void slotWindowQuickTileBottomLeft(); + void slotWindowQuickTileBottomRight(); void slotWalkThroughDesktops(); void slotWalkBackThroughDesktops();