GNOME Bugzilla – Bug 678369
GDK_WINDOW_OFFSCREEN doesn't implement all window methods
Last modified: 2016-03-06 03:28:32 UTC
Created attachment 216721 [details] [review] a proposed patch (works for me) I have to create some gtk UI a I want to use glade. I've found out that it is not possible to run glade in my KDE desktop with widget style oxygen-gtk. If I click on the new window icon from toolbar glage immeadiately crashes with SIGSEGV. What I discovered: glade creates a GDK_WINDOW_OFFSCREEN window and oxygen-gtk wants to get frame extents for this window. The problem is that it is not possible to get frame extents of an offscreen window. Problem description: The following lines are copied from glade, gtk and oxygen-gtk sources. The lines show steps to crash. 1. glade creates an attributes for offscreen window glade_design_layout_realize() : gladeui/glade-design-layout.c : 1630 attributes.window_type = GDK_WINDOW_OFFSCREEN; 2. glade_design_layout_realize() : gladeui/glade-design-layout.c : 1644 ipriv->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget), &attributes, attributes_mask); 3. gdk_window_new () : gdk/gdkwindow.c 11375 if (gdk_window_is_offscreen (window)) { _gdk_offscreen_window_new (window, attributes, attributes_mask); 4. gdk_window_is_offscreen() : gdk/gdkwindow.c : 11375 static gboolean gdk_window_is_offscreen (GdkWindow *window) { return window->window_type == GDK_WINDOW_OFFSCREEN; } 5. _gdk_offscreen_window_new() : gdk/gdkoffscreenwindow.c : 803 window->impl = g_object_new (GDK_TYPE_OFFSCREEN_WINDOW, NULL); 6. gdk_offscreen_window_class_init() : gdk/gdkoffscreenwindow.c : 766 impl_class->get_frame_extents = NULL; -- And finally. 7. Gtk::gdk_toplevel_get_frame_size() : src/oxygengtkutils.cpp : 882 gdk_window_get_frame_extents( topLevel, &rect ); 8. gdk_window_get_frame_extents() : gdk/gdkwindow.c : 10443 GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_frame_extents (window, rect); -- Ooops, get_frame_extents is NULL here Backtrace:
+ Trace 230387
*** This bug has been marked as a duplicate of bug 668505 ***