Bug 121120 - Opening context menu with a tablet PC's stylus locks the desktop partly
Summary: Opening context menu with a tablet PC's stylus locks the desktop partly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-01 00:26 UTC by Eckhart Wörner
Modified: 2006-02-02 00:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eckhart Wörner 2006-02-01 00:26:27 UTC
Version:           1.4.90 (using KDE 3.5.1, Debian Package 4:3.5.1-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-1-686

The following steps reproducably lock the desktop (though not completely):

1. Open the context menu, don't click an entry
2. Paint something on the image using the stylus

The context menu does not disappear but is still there, but you cannot select an entry anymore, the desktop apart from the paint area seems to be locked (you can still remove the context menu using your keyboard).
Comment 1 Halla Rempt 2006-02-01 08:18:23 UTC
I think that with this bug we also need the exact X11 version and make and model of your tablet pc. Could you supply that?
Comment 2 Eckhart Wörner 2006-02-01 18:20:35 UTC
I'm using xserver-xorg 6.8.2.dfsg.1-11 from debian testing on a Fujitsu Lifebook T4010 (which comes with a Wacom tablet).
Comment 3 Adrian Page 2006-02-01 21:49:08 UTC
I can reproduce this here so can look into it.
Comment 4 Adrian Page 2006-02-02 00:46:02 UTC
SVN commit 504726 by page:

Don't consume tablet generated core button events when a popup is active as Qt gets very confused.

BUG: 121120

 M  +22 -17    kis_canvas.cc  


--- trunk/koffice/krita/ui/kis_canvas.cc #504725:504726
@@ -952,16 +952,19 @@
             button = translateX11Button(buttonPressed -> button);
             buttonState = translateX11ButtonState(buttonPressed -> state);
 
-            XEvent mouseEvent;
+            if (QApplication::activePopupWidget() == 0) {
+                XEvent mouseEvent;
 
-            // Look for an accompanying core event.
-            if (XCheckTypedWindowEvent(x11Display, winId, ButtonPress, &mouseEvent)) {
-                if (buttonPressed -> time == mouseEvent.xbutton.time) {
-                    // Do nothing
+                // Look for and swallow an accompanying core event, but only if there's
+                // no active popup, as that needs to see it.
+                if (XCheckTypedWindowEvent(x11Display, winId, ButtonPress, &mouseEvent)) {
+                    if (buttonPressed -> time == mouseEvent.xbutton.time) {
+                        // Do nothing
+                    }
+                    else {
+                        XPutBackEvent(x11Display, &mouseEvent);
+                    }
                 }
-                else {
-                    XPutBackEvent(x11Display, &mouseEvent);
-                }
             }
         }
         else {
@@ -972,17 +975,19 @@
             button = translateX11Button(buttonReleased -> button);
             buttonState = translateX11ButtonState(buttonReleased -> state);
 
-            XEvent mouseEvent;
+            if (QApplication::activePopupWidget() == 0) {
+                XEvent mouseEvent;
 
-            // Look for an accompanying core event.
-            if (XCheckTypedWindowEvent(x11Display, winId, ButtonRelease, &mouseEvent)) {
-                if (buttonReleased -> time == mouseEvent.xbutton.time) {
-                    // Do nothing
-                    // kdDebug() << "Consumed core event" << endl;
+                // Look for and swallow an accompanying core event, but only if there's
+                // no active popup, as that needs to see it.
+                if (XCheckTypedWindowEvent(x11Display, winId, ButtonRelease, &mouseEvent)) {
+                    if (buttonReleased -> time == mouseEvent.xbutton.time) {
+                        // Do nothing
+                    }
+                    else {
+                        XPutBackEvent(x11Display, &mouseEvent);
+                    }
                 }
-                else {
-                    XPutBackEvent(x11Display, &mouseEvent);
-                }
             }
         }