[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    PATCH [ was: Re: Qt 2.3.2 and KDE_2_2_BRANCH]
From:       Matthias Ettrich <ettrich () trolltech ! com>
Date:       2001-11-15 19:35:33
[Download RAW message or body]

On Thursday 15 November 2001 12:43, Michael Brade wrote:
[snip]
> Hah, I just verified: disabling menu effects solved the problem! So I'm not
> sure anymore if this an XFree-only problem... Lars, is it possible for you
> to reproduce now?

Yes we can :-(

Attached is a patch.


Matthias
["popup.patch" (text/x-c++)]

==== //depot/qt/2.3/src/kernel/qapplication_x11.cpp#49 - \
/home/ettrich/qt-2.3/src/kernel/qapplication_x11.cpp ==== @@ -3552,6 +3552,21 @@
 	 else
 	     aw->setFocus();
 	 QFocusEvent::resetReason();
+	 if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
+	     int r = XGrabKeyboard( aw->x11Display(), aw->winId(), TRUE,
+				    GrabModeSync, GrabModeAsync, CurrentTime );
+	     if ( (popupGrabOk = (r == GrabSuccess)) ) {
+		 r = XGrabPointer( aw->x11Display(), aw->winId(), TRUE,
+				   (uint)(ButtonPressMask | ButtonReleaseMask |
+					  ButtonMotionMask | EnterWindowMask |
+					  LeaveWindowMask | PointerMotionMask),
+				   GrabModeSync, GrabModeAsync,
+				   None, None, CurrentTime );
+
+		 if ( (popupGrabOk = (r == GrabSuccess)) )
+		     XAllowEvents( aw->x11Display(), SyncPointer, CurrentTime );
+	     }
+	 }
      }
 }
 


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic