[gtk+/wip/carlosg/event-delivery: 224/261] gtkwindow: Ignore implicit grabs going away if there is no focus
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 224/261] gtkwindow: Ignore implicit grabs going away if there is no focus
- Date: Mon, 8 May 2017 21:03:29 +0000 (UTC)
commit 2a787bacdbfbda4fab32d23d14f5cb8eefaec6b6
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 1 22:41:23 2017 +0200
gtkwindow: Ignore implicit grabs going away if there is no focus
There should be no circumstances where an implicit grab is requested but
no focus exists, there's however circumstances (like windowing grabs taking
input to a different window) where we might get implicit grabs being undone
when then new window didn't create a focus for the pointer itself.
gtk/gtkwindow.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e6eb2b4..237597e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11509,6 +11509,8 @@ gtk_window_set_pointer_focus_grab (GtkWindow *window,
GtkPointerFocus *focus;
focus = gtk_window_lookup_pointer_focus (window, device, sequence);
+ if (!focus && !grab_widget)
+ return;
g_assert (focus != NULL);
gtk_pointer_focus_set_implicit_grab (focus, grab_widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]