Ethereal-dev: Re: [ethereal-dev] ethereal-0.7.9 core dumps in vfprintf on dissecting smb lanma
> I have a patch (it appears to be home, rather than here at work) to GLib
> and GTK+ that adds a "--gtk-no-grabs" command-line flag for GTK+,
> telling it not to do grabs.
Actually, it was a patch to GTK+, but it included changes to the GDK
layer.
I've attached it - it's a patch to GTK+ 1.2.6.
*** gdk/gdk.h.dist Thu Sep 23 17:45:47 1999
--- gdk/gdk.h Mon Oct 11 20:33:52 1999
***************
*** 990,995 ****
--- 990,998 ----
gboolean gdk_keyval_is_upper (guint keyval);
gboolean gdk_keyval_is_lower (guint keyval);
+ /* Flag to disable grabs */
+ gboolean gdk_no_grabs;
+
/* Threading
*/
*** gdk/gdk.c.dist Mon Aug 23 12:40:31 1999
--- gdk/gdk.c Mon Oct 11 20:34:07 1999
***************
*** 641,646 ****
--- 641,649 ----
g_return_val_if_fail (window != NULL, 0);
+ if (gdk_no_grabs)
+ return Success;
+
window_private = (GdkWindowPrivate*) window;
confine_to_private = (GdkWindowPrivate*) confine_to;
cursor_private = (GdkCursorPrivate*) cursor;
***************
*** 771,776 ****
--- 774,782 ----
g_return_val_if_fail (window != NULL, 0);
+ if (gdk_no_grabs)
+ return Success;
+
window_private = (GdkWindowPrivate*) window;
xwindow = window_private->xwindow;
*** gtk/gtkmain.c.dist Fri Sep 3 15:20:39 1999
--- gtk/gtkmain.c Mon Oct 11 20:34:48 1999
***************
*** 262,267 ****
--- 262,271 ----
g_log_set_always_fatal (fatal_mask);
(*argv)[i] = NULL;
}
+ else if (strcmp ("--gtk-no-grabs", (*argv)[i]) == 0)
+ {
+ gdk_no_grabs = TRUE;
+ }
#ifdef G_ENABLE_DEBUG
else if ((strcmp ("--gtk-debug", (*argv)[i]) == 0) ||
(strncmp ("--gtk-debug=", (*argv)[i], 12) == 0))