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 |
|
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
||||||
StructureNotifyMask | FocusChangeMask;
|
StructureNotifyMask | FocusChangeMask;
|
||||||
|
|
||||||
if (grab_keyboard)
|
|
||||||
input_mask |= EnterWindowMask | LeaveWindowMask;
|
|
||||||
if (sendmotion)
|
if (sendmotion)
|
||||||
input_mask |= PointerMotionMask;
|
input_mask |= PointerMotionMask;
|
||||||
if (ownbackstore)
|
if (ownbackstore)
|
||||||
@ -518,21 +516,18 @@ xwin_process_events(void)
|
|||||||
MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y);
|
MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EnterNotify:
|
case FocusIn:
|
||||||
|
reset_modifier_keys();
|
||||||
if (grab_keyboard)
|
if (grab_keyboard)
|
||||||
XGrabKeyboard(display, wnd, True,
|
XGrabKeyboard(display, wnd, True,
|
||||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LeaveNotify:
|
case FocusOut:
|
||||||
if (grab_keyboard)
|
if (grab_keyboard)
|
||||||
XUngrabKeyboard(display, CurrentTime);
|
XUngrabKeyboard(display, CurrentTime);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FocusIn:
|
|
||||||
reset_modifier_keys();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Expose:
|
case Expose:
|
||||||
XCopyArea(display, backstore, wnd, gc,
|
XCopyArea(display, backstore, wnd, gc,
|
||||||
xevent.xexpose.x, xevent.xexpose.y,
|
xevent.xexpose.x, xevent.xexpose.y,
|
||||||
|
Loading…
Reference in New Issue
Block a user