From 23afca950ea679336cb657f59d460d0aef078858 Mon Sep 17 00:00:00 2001 From: Matt Chapman Date: Tue, 24 Sep 2002 12:25:21 +0000 Subject: [PATCH] Move keyboard grabbing to FocusIn/FocusOut to fix "rdesktop gets screensaver password" problem. Hopefully this won't bring back the phantom flashing titlebar... git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@193 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/xwin.c b/xwin.c index 8c85ab7..549f857 100644 --- a/xwin.c +++ b/xwin.c @@ -350,8 +350,6 @@ ui_create_window(void) input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | StructureNotifyMask | FocusChangeMask; - if (grab_keyboard) - input_mask |= EnterWindowMask | LeaveWindowMask; if (sendmotion) input_mask |= PointerMotionMask; if (ownbackstore) @@ -518,21 +516,18 @@ xwin_process_events(void) MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y); break; - case EnterNotify: + case FocusIn: + reset_modifier_keys(); if (grab_keyboard) XGrabKeyboard(display, wnd, True, GrabModeAsync, GrabModeAsync, CurrentTime); break; - case LeaveNotify: + case FocusOut: if (grab_keyboard) XUngrabKeyboard(display, CurrentTime); break; - case FocusIn: - reset_modifier_keys(); - break; - case Expose: XCopyArea(display, backstore, wnd, gc, xevent.xexpose.x, xevent.xexpose.y,