Bug 101468 - race condition when using NETRootInfo::moveResizeRequest
Summary: race condition when using NETRootInfo::moveResizeRequest
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-14 10:39 UTC by Charles Samuels
Modified: 2006-01-06 16:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
     };
 
     /**