Now that xfdesktop can receive focus, it's possible for the user to press Alt+F4 (default to close). While xfdesktop should not quit, the thing is it crashes when sent a wm_delete_window window manager event. It shows a bunch of warnings like the ones and then dies with a SEGFAULT: (xfdesktop:12089): Gtk-CRITICAL **: gtk_widget_event: assertion `GTK_IS_WIDGET (widget)' failed (xfdesktop:12089): Gtk-CRITICAL **: gtk_widget_get_toplevel: assertion `GTK_IS_WIDGET (widget)' failed And gdb backtrace follows: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47212934918864 (LWP 12089)] 0x00002af09c6ec280 in g_type_check_instance_is_a () from /usr/lib/libgobject-2.0.so.0 (gdb) bt #0 0x00002af09c6ec280 in g_type_check_instance_is_a () from /usr/lib/libgobject-2.0.so.0 #1 0x00002af09b167cce in gtk_widget_event () from /usr/lib/libgtk-x11-2.0.so.0 #2 0x00002af09b087f90 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #3 0x00002af09b3d3f4c in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0 #4 0x00002af09ca344bd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #5 0x00002af09ca3765f in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #6 0x00002af09ca3790a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #7 0x00002af09b087360 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x000000000040e6f7 in main (argc=1, argv=0x7fffffa0d108) at main.c:354 (gdb) Reproducible: Always Steps to Reproduce: 1. Focus the desktop 2. Press Alt+F4 Actual Results: xfdesktop dies
Created attachment 472 Proposed fix The following patch fixes the problem.
Hehe, that's actually kinda funny. I like this fix better though: widget_class->delete_event = (gboolean (*)(GtkWidget *, GdkEventAny *))gtk_true; ^_^
Another point would be why xfdesktop cores when exited properly.
It doesn't, at least not for me. If you have a stacktrace, you could file another bug though ^_^
hehehe, there was a backtrace in original the bug report.
Oh, didn't realise that's what you were talking about, because xfdesktop isn't exiting at all that point. Just the main window got destroyed. Anyway, I'll look into it later, but it's really not all that important to me.