From: "Kurt Miller" <[EMAIL PROTECTED]>
> From: "Gregory Steuck" <[EMAIL PROTECTED]>
>> I, for one, prefer gtk1 UI. Maybe simply because gtk2 has a nasty bug
>> with ion wm (fixed in gtk repository, but not in the released version).
>>
>
> Is this the problem you are referring to?
>
> http://www.mail-archive.com/[email protected]/msg00277.html
>
If it is the issue, could you confirm that this fixes it?
Thanks,
-Kurt
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/gtk+2/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 24 May 2005 21:29:11 -0000 1.22
+++ Makefile 28 Jul 2005 15:54:27 -0000
@@ -7,8 +7,8 @@
VERSION= 2.6.7
DISTNAME= gtk+-${VERSION}
-PKGNAME= gtk+2-${VERSION}
-PKGNAME-docs= gtk+2-docs-${VERSION}
+PKGNAME= gtk+2-${VERSION}p0
+PKGNAME-docs= gtk+2-docs-${VERSION}p0
CATEGORIES= x11 devel
HOMEPAGE= http://www.gtk.org
Index: patches/patch-gdk_x11_gdkevents-x11_c
===================================================================
RCS file: patches/patch-gdk_x11_gdkevents-x11_c
diff -N patches/patch-gdk_x11_gdkevents-x11_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-gdk_x11_gdkevents-x11_c 28 Jul 2005 15:54:27 -0000
@@ -0,0 +1,133 @@
+$OpenBSD$
+--- gdk/x11/gdkevents-x11.c.orig Tue Mar 15 22:25:09 2005
++++ gdk/x11/gdkevents-x11.c Thu Jul 28 11:55:51 2005
+@@ -1218,16 +1218,19 @@ gdk_event_translate (GdkDisplay *display
+ }
+
+ /* Handle focusing (in the case where no window manager is running */
+- if (toplevel &&
+- xevent->xcrossing.detail != NotifyInferior &&
+- xevent->xcrossing.focus && !toplevel->has_focus_window)
++ if (toplevel && xevent->xcrossing.detail != NotifyInferior)
+ {
+- gboolean had_focus = HAS_FOCUS (toplevel);
++ toplevel->has_pointer = TRUE;
+
+- toplevel->has_pointer_focus = TRUE;
+-
+- if (HAS_FOCUS (toplevel) != had_focus)
+- generate_focus_event (window, TRUE);
++ if (xevent->xcrossing.focus && !toplevel->has_focus_window)
++ {
++ gboolean had_focus = HAS_FOCUS (toplevel);
++
++ toplevel->has_pointer_focus = TRUE;
++
++ if (HAS_FOCUS (toplevel) != had_focus)
++ generate_focus_event (window, TRUE);
++ }
+ }
+
+ /* Tell XInput stuff about it if appropriate */
+@@ -1312,16 +1315,19 @@ gdk_event_translate (GdkDisplay *display
+ }
+
+ /* Handle focusing (in the case where no window manager is running */
+- if (toplevel &&
+- xevent->xcrossing.detail != NotifyInferior &&
+- xevent->xcrossing.focus && !toplevel->has_focus_window)
++ if (toplevel && xevent->xcrossing.detail != NotifyInferior)
+ {
+- gboolean had_focus = HAS_FOCUS (toplevel);
+-
+- toplevel->has_pointer_focus = FALSE;
+-
+- if (HAS_FOCUS (toplevel) != had_focus)
+- generate_focus_event (window, FALSE);
++ toplevel->has_pointer = FALSE;
++
++ if (xevent->xcrossing.focus && !toplevel->has_focus_window)
++ {
++ gboolean had_focus = HAS_FOCUS (toplevel);
++
++ toplevel->has_pointer_focus = FALSE;
++
++ if (HAS_FOCUS (toplevel) != had_focus)
++ generate_focus_event (window, FALSE);
++ }
+ }
+
+ event->crossing.type = GDK_LEAVE_NOTIFY;
+@@ -1404,10 +1410,25 @@ gdk_event_translate (GdkDisplay *display
+ switch (xevent->xfocus.detail)
+ {
+ case NotifyAncestor:
+- case NotifyNonlinear:
+ case NotifyVirtual:
++ /* When the focus moves from an ancestor of the window to
++ * the window or a descendent of the window, *and* the
++ * pointer is inside the window, then we were previously
++ * receiving keystroke events in the has_pointer_focus
++ * case and are now receiving them in the
++ * has_focus_window case.
++ */
++ if (toplevel->has_pointer &&
++ xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
++ toplevel->has_pointer_focus = FALSE;
++
++ /* fall through */
++ case NotifyNonlinear:
+ case NotifyNonlinearVirtual:
+- toplevel->has_focus_window = TRUE;
++ if (xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
++ toplevel->has_focus_window = TRUE;
+ /* We pretend that the focus moves to the grab
+ * window, so we pay attention to NotifyGrab
+ * NotifyUngrab, and ignore NotifyWhileGrabbed
+@@ -1420,7 +1441,8 @@ gdk_event_translate (GdkDisplay *display
+ * but the pointer focus is ignored while a
+ * grab is in effect
+ */
+- if (xevent->xfocus.mode != NotifyGrab)
++ if (xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
+ toplevel->has_pointer_focus = TRUE;
+ break;
+ case NotifyInferior:
+@@ -1447,15 +1469,31 @@ gdk_event_translate (GdkDisplay *display
+ switch (xevent->xfocus.detail)
+ {
+ case NotifyAncestor:
+- case NotifyNonlinear:
+ case NotifyVirtual:
++ /* When the focus moves from the window or a descendent
++ * of the window to an ancestor of the window, *and* the
++ * pointer is inside the window, then we were previously
++ * receiving keystroke events in the has_focus_window
++ * case and are now receiving them in the
++ * has_pointer_focus case.
++ */
++ if (toplevel->has_pointer &&
++ xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
++ toplevel->has_pointer_focus = TRUE;
++
++ /* fall through */
++ case NotifyNonlinear:
+ case NotifyNonlinearVirtual:
+- toplevel->has_focus_window = FALSE;
++ if (xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
++ toplevel->has_focus_window = FALSE;
+ if (xevent->xfocus.mode != NotifyWhileGrabbed)
+ toplevel->has_focus = FALSE;
+ break;
+ case NotifyPointer:
+- if (xevent->xfocus.mode != NotifyUngrab)
++ if (xevent->xfocus.mode != NotifyGrab &&
++ xevent->xfocus.mode != NotifyUngrab)
+ toplevel->has_pointer_focus = FALSE;
+ break;
+ case NotifyInferior:
Index: patches/patch-gdk_x11_gdkwindow-x11_h
===================================================================
RCS file: patches/patch-gdk_x11_gdkwindow-x11_h
diff -N patches/patch-gdk_x11_gdkwindow-x11_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-gdk_x11_gdkwindow-x11_h 28 Jul 2005 15:54:27 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- gdk/x11/gdkwindow-x11.h.orig Mon Oct 18 17:02:37 2004
++++ gdk/x11/gdkwindow-x11.h Thu Jul 28 11:55:51 2005
+@@ -96,9 +96,14 @@ struct _GdkToplevelX11
+ */
+ guint has_focus : 1;
+
+- /* Set if !window->has_focus_window, but events are being sent to the
+- * window because the pointer is in it. (Typically, no window
+- * manager is running.
++ /* Set if the pointer is inside this window. (This is needed for
++ * for focus tracking)
++ */
++ guint has_pointer : 1;
++
++ /* Set if the window is a descendent of the focus window and the pointer is
++ * inside it. (This is the case where the window will receive keystroke
++ * events even window->has_focus_window is FALSE)
+ */
+ guint has_pointer_focus : 1;
+