Bug 92583

Summary: "Active Desktop Borders" cease to work after changing resolution
Product: [Plasma] kwin Reporter: Thomas McGuire <mcguire>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas McGuire 2004-11-02 15:55:48 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

The title says it all: If the resolution is lowered, for example from 1024X768 to 800X600, the right and lower desktop border no longer work.

I guess this is because kwin still checks if the mouse reaches the 1024th pixel, despite only 800 pixels being available.
Comment 1 Lubos Lunak 2004-11-02 16:19:07 UTC
CVS commit by lunakl: 

Force updating electric borders on resize change.
BUG:92583


  M +1 -1      geometry.cpp   2.94
  M +4 -1      workspace.cpp   1.488
  M +1 -1      workspace.h   1.183


--- kdebase/kwin/geometry.cpp  #2.93:2.94
@@ -45,5 +45,5 @@ void Workspace::desktopResized()
     {
     updateClientArea();
-    checkElectricBorders();
+    checkElectricBorders( true );
     }
 

--- kdebase/kwin/workspace.cpp  #1.487:1.488
@@ -1834,6 +1834,9 @@ void Workspace::cancelDelayFocus()
 // 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;
 

--- kdebase/kwin/workspace.h  #1.182:1.183
@@ -413,5 +413,5 @@ class Workspace : public QObject, public
 
     // electric borders
-        void checkElectricBorders();
+        void checkElectricBorders( bool force = false );
         void createBorderWindows();
         void destroyBorderWindows();