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
This commit is contained in:
parent
837d91eefc
commit
23afca950e
11
xwin.c
11
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,
|
||||
|
Loading…
Reference in New Issue
Block a user