xfce4-session broken
Olivier Fourdan
fourdan at xfce.org
Sat Mar 13 15:00:52 CET 2004
And a patch to show what I mean. That one works with gtk 2.3.6 (w/out
the stripes obviously)
Cheers,
Olivier.
On Sat, 2004-03-13 at 14:40, Olivier Fourdan wrote:
> On Sat, 2004-03-13 at 10:34, Benedikt Meurer wrote:
> > Anything new on this topic?
>
> Yes, the problem is similar to #93103 in gnome-session, grabbing the
> server causes a dead lock. Removing it all together fixes the issue.
>
> There is another problem (and I'm a bit surprised this one doesn't show
> in gtk 2.2 too), as by calling "gtk_widget_show ()" you assume the
> widget is realized and visible. I think you should use
> "gtk_widget_show_now ()" for that, as grabbing is not permitted by X on
> an invisible window (IIRC).
>
> HTH,
> Cheers,
--
- Olivier Fourdan - fourdan at xfce.org - http://www.xfce.org -
-------------- next part --------------
--- shutdown.c.orig 2004-03-13 14:58:49.000000000 +0100
+++ shutdown.c 2004-03-13 14:58:10.000000000 +0100
@@ -205,18 +205,23 @@
/* this window *should* not be handled by the window manager */
g_object_set(G_OBJECT(dialog), "type", GTK_WINDOW_POPUP, NULL);
+#if GTK_CHECK_VERSION(2, 3, 0)
+ g_object_set(G_OBJECT(dialog), "type_hint", GDK_WINDOW_TYPE_HINT_UTILITY, NULL);
+ g_object_set(G_OBJECT(dialog), "decorated", FALSE, NULL);
+#endif
/*
* Grabbing the Xserver when accessibility is enabled will cause a
* hang. Found in gnome-session (see #93103 for details).
*/
accessibility = GTK_IS_ACCESSIBLE(gtk_widget_get_accessible(dialog));
+#if !GTK_CHECK_VERSION(2, 3, 0)
if (!accessibility) {
gdk_x11_grab_server();
drawBackground();
gdk_flush();
}
-
+#endif
dbox = GTK_DIALOG(dialog)->vbox;
/* if we cannot determine user's realname, fallback to account name */
@@ -284,7 +289,7 @@
gtk_widget_show(checkbox);
/* need to realize the dialog first! */
- gtk_widget_show(dialog);
+ gtk_widget_show_now(dialog);
/* Grab Keyboard and Mouse pointer */
gdk_pointer_grab(dialog->window, TRUE, 0, NULL, NULL, GDK_CURRENT_TIME);
@@ -304,12 +309,13 @@
gtk_widget_destroy(dialog);
+#if !GTK_CHECK_VERSION(2, 3, 0)
/* ungrab the Xserver */
if (!accessibility) {
gdk_x11_ungrab_server();
refreshBackground();
}
-
+#endif
/* Release Keyboard/Mouse pointer grab */
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
gdk_pointer_ungrab(GDK_CURRENT_TIME);
More information about the Xfce4-dev
mailing list