PATCH: Fix for gtk_window_focus_filter()
- From: Federico Mena Quintero <federico ximian com>
- To: gtk-devel-list gnome org
- Subject: PATCH: Fix for gtk_window_focus_filter()
- Date: Tue, 24 Apr 2001 20:43:32 -0500
As discussed with Owen, this is the patch that fixes
gtk_window_focus_filter(). May I commit it?
Federico
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.
Index: gtkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.75.2.28
diff -u -r1.75.2.28 gtkwindow.c
--- gtkwindow.c 2001/03/15 04:39:32 1.75.2.28
+++ gtkwindow.c 2001/04/25 01:40:36
@@ -985,7 +986,8 @@
break;
case EnterNotify:
case LeaveNotify:
- if (xev->xcrossing.detail != NotifyInferior &&
+ 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]