better handling of starting a new interactive grab while one is in progress
This commit is contained in:
parent
a098c2437e
commit
d8d1eb53cd
1 changed files with 12 additions and 6 deletions
|
@ -112,14 +112,20 @@ gboolean keyboard_bind(GList *keylist, ObAction *action)
|
||||||
void keyboard_interactive_grab(guint state, ObClient *client,
|
void keyboard_interactive_grab(guint state, ObClient *client,
|
||||||
ObFrameContext context, ObAction *action)
|
ObFrameContext context, ObAction *action)
|
||||||
{
|
{
|
||||||
if (!interactive_grab && grab_keyboard(TRUE)) {
|
if (!interactive_grab) {
|
||||||
|
if (!grab_keyboard(TRUE))
|
||||||
|
return;
|
||||||
|
if (!grab_pointer(TRUE, None)) {
|
||||||
|
grab_keyboard(FALSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
interactive_grab = TRUE;
|
interactive_grab = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
grabbed_state = state;
|
grabbed_state = state;
|
||||||
grabbed_client = client;
|
grabbed_client = client;
|
||||||
grabbed_action = action;
|
grabbed_action = action;
|
||||||
grabbed_context = context;
|
grabbed_context = context;
|
||||||
grab_pointer(TRUE, None);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean keyboard_process_interactive_grab(const XEvent *e,
|
gboolean keyboard_process_interactive_grab(const XEvent *e,
|
||||||
|
|
Loading…
Reference in a new issue