Only consider crossing events if the parent of the window is the root
2001-04-19 Federico Mena Quintero <federico@ximian.com> * gtk/gtkwindow.c (gtk_window_focus_filter): Only consider crossing events if the parent of the window is the root window. This is so that GtkPlugs will not do funny things when they think they should get the focus.
This commit is contained in:
committed by
Federico Mena Quintero
parent
1c21a77a84
commit
096301bd5f
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-19 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_focus_filter): Only consider
|
||||
crossing events if the parent of the window is the root window.
|
||||
This is so that GtkPlugs will not do funny things when they think
|
||||
they should get the focus.
|
||||
|
||||
Wed Apr 11 16:20:00 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_parse_uline): Fix check
|
||||
|
||||
@@ -985,7 +985,13 @@ gtk_window_focus_filter (GdkXEvent *xevent,
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
if (xev->xcrossing.detail != NotifyInferior &&
|
||||
/* We only track the actual destination of keyboard events for real
|
||||
* toplevels, not for embedded toplevels such as GtkPlug. The reason for
|
||||
* this is that GtkPlug redirects events so the widget may effectively not
|
||||
* have the focus even if it actually has the focus.
|
||||
*/
|
||||
if (gdk_window_get_parent (GTK_WIDGET (window)->window) == GDK_ROOT_PARENT () &&
|
||||
xev->xcrossing.detail != NotifyInferior &&
|
||||
xev->xcrossing.focus && !window->window_has_focus)
|
||||
{
|
||||
window->window_has_pointer_focus = (xev->xany.type == EnterNotify) ? TRUE : FALSE;
|
||||
|
||||
Reference in New Issue
Block a user