mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,x11] fix right control ungrab
ungrab keybaord/mouse on first right control press. Fixes #9959
This commit is contained in:
@@ -555,11 +555,11 @@ BOOL xf_keyboard_handle_special_keys(xfContext* xfc, KeySym keysym)
|
||||
// do not return anything such that the key could be used by client if ungrab is not the goal
|
||||
if (keysym == XK_Control_R)
|
||||
{
|
||||
if (mod.RightCtrl && xfc->firstPressRightCtrl)
|
||||
if (mod.RightCtrl && !xfc->wasRightCtrlAlreadyPressed)
|
||||
{
|
||||
// Right Ctrl is pressed, getting ready to ungrab
|
||||
xfc->ungrabKeyboardWithRightCtrl = TRUE;
|
||||
xfc->firstPressRightCtrl = FALSE;
|
||||
xfc->wasRightCtrlAlreadyPressed = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -689,7 +689,7 @@ void xf_keyboard_handle_special_keys_release(xfContext* xfc, KeySym keysym)
|
||||
if (keysym != XK_Control_R)
|
||||
return;
|
||||
|
||||
xfc->firstPressRightCtrl = TRUE;
|
||||
xfc->wasRightCtrlAlreadyPressed = FALSE;
|
||||
|
||||
if (!xfc->ungrabKeyboardWithRightCtrl)
|
||||
return;
|
||||
|
||||
@@ -277,7 +277,7 @@ struct xf_context
|
||||
button_map button_map[NUM_BUTTONS_MAPPED];
|
||||
BYTE savedMaximizedState;
|
||||
UINT32 locked;
|
||||
BOOL firstPressRightCtrl;
|
||||
BOOL wasRightCtrlAlreadyPressed;
|
||||
BOOL ungrabKeyboardWithRightCtrl;
|
||||
|
||||
#if defined(WITH_XI)
|
||||
|
||||
Reference in New Issue
Block a user