From 816f3bd86ed68af3ae07926def48f3f13187f0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 2 Nov 2004 15:19:01 +0000 Subject: [PATCH] Force updating electric borders on resize change. BUG:92583 svn path=/trunk/kdebase/kwin/; revision=359883 --- geometry.cpp | 2 +- workspace.cpp | 5 ++++- workspace.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 726eca153b..162b8c5f60 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -44,7 +44,7 @@ namespace KWinInternal void Workspace::desktopResized() { updateClientArea(); - checkElectricBorders(); + checkElectricBorders( true ); } /*! diff --git a/workspace.cpp b/workspace.cpp index 6273a2dad0..172eb3537d 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1833,8 +1833,11 @@ void Workspace::cancelDelayFocus() // borders. Technically this is done with input only windows. Since // electric borders can be switched on and off, we have these two // functions to create and destroy them. -void Workspace::checkElectricBorders() +void Workspace::checkElectricBorders( bool force ) { + if( force ) + destroyBorderWindows(); + electric_current_border = 0; QRect r = QApplication::desktop()->geometry(); diff --git a/workspace.h b/workspace.h index d174206d4d..d3792398f7 100644 --- a/workspace.h +++ b/workspace.h @@ -412,7 +412,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine void tabBoxKeyRelease( const XKeyEvent& ev ); // electric borders - void checkElectricBorders(); + void checkElectricBorders( bool force = false ); void createBorderWindows(); void destroyBorderWindows(); void electricBorder(XEvent * e);