Bug 101468

Summary: race condition when using NETRootInfo::moveResizeRequest
Product: [Plasma] kwin Reporter: Charles Samuels <charles>
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 Charles Samuels 2005-03-14 10:39:33 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Fire up knotes, and click on its titlebar really "quickly."  After a couple tries, especially on high load, after you let go, the window will stick to the cursor.

This is a race condition, by the time KWin got the moveResizeRequest, the cursor has already been released.

KNotes however does get the mouse release event, so all it has to do is ask KWin to stop the moveResizeRequest.  All is needed is an API for that.
Comment 1 Lubos Lunak 2006-01-06 16:07:28 UTC
SVN commit 494899 by lunakl:

Implement _NET_WM_MOVERESIZECANCEL.
BUG: 101468



 M  +6 -0      kdebase/kwin/events.cpp  
 M  +5 -1      kdelibs/kdecore/netwm_def.h  


--- branches/KDE/3.5/kdebase/kwin/events.cpp #494898:494899
@@ -1472,6 +1472,12 @@
     {
     if( direction == NET::Move )
         performMouseCommand( Options::MouseMove, QPoint( x_root, y_root ));
+    else if( moveResizeMode && direction == NET::MoveResizeCancel )
+    {
+        finishMoveResize( true );
+        buttonDown = FALSE;
+        setCursor( mode );
+    }
     else if( direction >= NET::TopLeft && direction <= NET::Left ) 
         {
         static const Position convert[] =
--- branches/KDE/3.5/kdelibs/kdecore/netwm_def.h #494898:494899
@@ -415,7 +415,11 @@
     /**
        @since 3.2
     **/
-	KeyboardMove = 10  // move via keyboard
+	KeyboardMove = 10, // move via keyboard
+    /**
+      @since 3.5.1
+    **/
+	MoveResizeCancel = 11 // to ask the WM to stop moving a window
     };
 
     /**