From f435f716b81e7bcbb1b1ac52fc93ab9d1f39bd8b Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Fri, 23 Sep 2011 15:46:29 +0200 Subject: [PATCH 1/5] do not paint buttons (from parent) if hidden. --- clients/oxygen/oxygenclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index e956eeeb17..f05c3e8ebf 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1414,7 +1414,7 @@ namespace Oxygen QList buttons( widget()->findChildren() ); foreach( Button* button, buttons ) { - if( event->rect().intersects( button->geometry() ) ) + if( button->isVisible() && event->rect().intersects( button->geometry() ) ) { painter.save(); painter.setViewport( button->geometry() ); From 51ef7518ddb8f467df1f70378f438fbb0a728368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 18 Sep 2011 11:33:42 +0200 Subject: [PATCH 2/5] add EffectWindow::windowType --- effects.cpp | 5 +++++ effects.h | 1 + libkwineffects/kwineffects.h | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/effects.cpp b/effects.cpp index daf4a754be..4f8116af3c 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1612,6 +1612,11 @@ bool EffectWindowImpl::isDNDIcon() const return toplevel->isDNDIcon(); } +NET::WindowType EffectWindowImpl::windowType() const +{ + return toplevel->windowType(); +} + bool EffectWindowImpl::isManaged() const { return dynamic_cast< const Client* >(toplevel) != NULL; diff --git a/effects.h b/effects.h index 59faa89f58..fc0c34dadc 100644 --- a/effects.h +++ b/effects.h @@ -285,6 +285,7 @@ public: virtual bool isNotification() const; virtual bool isComboBox() const; virtual bool isDNDIcon() const; + virtual NET::WindowType windowType() const; virtual bool isManaged() const; // managed or override-redirect virtual bool acceptsFocus() const; virtual bool keepAbove() const; diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index fa1b476dc1..6ae0a6d145 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -41,6 +41,7 @@ along with this program. If not, see . #include #include +#include class KLibrary; class KConfigGroup; @@ -1212,6 +1213,11 @@ public: * See _NET_WM_WINDOW_TYPE_DND at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . */ virtual bool isDNDIcon() const = 0; + /** + * Returns the NETWM window type + * See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html . + */ + virtual NET::WindowType windowType() const = 0; /** * Returns whether the window is managed by KWin (it has control over its placement and other * aspects, as opposed to override-redirect windows that are entirely handled by the application). From 8c668e6126161eb4d0bfc9ce49bcf2af44c4f539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 25 Sep 2011 17:52:05 +0200 Subject: [PATCH 3/5] fix tabbing ./. utility hiding BUG: 225500 REVIEW: 102699 --- workspace.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index cf91480051..466dece787 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -809,10 +809,9 @@ void Workspace::updateToolWindows(bool also_hide) { // TODO: What if Client's transiency/group changes? should this be called too? (I'm paranoid, am I not?) if (!options->hideUtilityWindowsForInactive) { - for (ClientList::ConstIterator it = clients.constBegin(); - it != clients.constEnd(); - ++it) - (*it)->hideClient(false); + for (ClientList::ConstIterator it = clients.constBegin(); it != clients.constEnd(); ++it) + if (!(*it)->clientGroup() || (*it)->clientGroup()->visible() == *it) + (*it)->hideClient(false); return; } const Group* group = NULL; From ed216df8e3740ea9b4d636548bbbcbbb54f02a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 26 Sep 2011 15:15:41 +0200 Subject: [PATCH 4/5] fix commit 169a3d88, restoring the parameter is good, asserting it not --- kcmkwin/kwinrules/ruleswidget.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 8032840b45..3c5ad4db54 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -388,9 +388,9 @@ static NET::WindowType comboToType(int val) void RulesWidget::setRules(Rules* rules) { - Rules tmp; - - Q_ASSERT( rules ); + const bool readFromNewEmptyRules = !rules; + if (readFromNewEmptyRules) + rules = new Rules; description->setText(rules->description); wmclass->setText(rules->wmclass); @@ -451,6 +451,11 @@ void RulesWidget::setRules(Rules* rules) CHECKBOX_FORCE_RULE(strictgeometry,); CHECKBOX_FORCE_RULE(disableglobalshortcuts,); CHECKBOX_FORCE_RULE(blockcompositing,); + + if (readFromNewEmptyRules) { + delete rules; + rules = NULL; // it's the function parameter... + } } #undef GENERIC_RULE From 38d760c960017b27d24799919ef38141c3b8e9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 27 Sep 2011 17:42:20 +0200 Subject: [PATCH 5/5] Only push shader when Cube effect is active This caused situations in which the shader was pushed but never popped from the stack as for the latter case there was a check whether the effect is active. BUG: 280455 --- effects/cube/cube.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index f48f0f731a..9b957c29c4 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -1292,9 +1292,10 @@ void CubeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int t void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) { ShaderManager *shaderManager = ShaderManager::instance(); - GLShader *shader = shaderManager->pushShader(ShaderManager::GenericShader); + GLShader *shader = NULL; QMatrix4x4 origMatrix; if (activated && cube_painting) { + shader = shaderManager->pushShader(ShaderManager::GenericShader); //kDebug(1212) << w->caption(); float opacity = cubeOpacity; if (start) {