After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678369 - GDK_WINDOW_OFFSCREEN doesn't implement all window methods
GDK_WINDOW_OFFSCREEN doesn't implement all window methods
Status: RESOLVED DUPLICATE of bug 668505
Product: gtk+
Classification: Platform
Component: Backend: X11
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-06-19 06:33 UTC by Jakub Filak
Modified: 2016-03-06 03:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a proposed patch (works for me) (19.24 KB, patch)
2012-06-19 06:33 UTC, Jakub Filak
none Details | Review

Description Jakub Filak 2012-06-19 06:33:19 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:
  • #0 ??
  • #1 gdk_toplevel_get_frame_size
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygengtkutils.cpp line 882
  • #2 Oxygen::Gtk::gdk_toplevel_get_frame_size
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygengtkutils.cpp line 868
  • #3 Oxygen::Gtk::gdk_window_map_to_toplevel
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygengtkutils.cpp line 747
  • #4 gdk_map_to_toplevel
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygengtkutils.h line 117
  • #5 Oxygen::Style::renderWindowBackground
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygenstyle.cpp line 264
  • #6 renderWindowBackground
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygenstyle.h line 141
  • #7 Oxygen::render_background
    at /usr/src/debug/oxygen-gtk3-1.0.4/src/oxygenthemingengine.cpp line 311
  • #8 gtk_render_background
    at gtkstylecontext.c line 3740
  • #9 gtk_window_draw
    at gtkwindow.c line 7449
  • #10 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #11 gtk_widget_draw_marshaller
    at gtkwidget.c line 819
  • #12 g_closure_invoke
    at gclosure.c line 774
  • #13 signal_emit_unlocked_R
    at gsignal.c line 3310
  • #14 g_signal_emit_valist
    at gsignal.c line 3013
  • #15 g_signal_emit
    at gsignal.c line 3060
  • #16 _gtk_widget_draw_internal
    at gtkwidget.c line 5722
  • #17 _gtk_widget_draw_internal
    at gtkwidget.c line 5698
  • #18 gtk_widget_send_expose
    at gtkwidget.c line 5969
  • #19 gtk_main_do_event
    at gtkmain.c line 1801
  • #20 _gdk_window_process_updates_recurse
    at gdkwindow.c line 3857
  • #21 _gdk_window_process_updates_recurse
    at gdkwindow.c line 3830
  • #22 gdk_window_process_updates_internal
    at gdkwindow.c line 4013
  • #23 gdk_window_process_all_updates
    at gdkwindow.c line 4144
  • #24 gtk_container_idle_sizer
    at gtkcontainer.c line 1664
  • #25 gdk_threads_dispatch
    at gdk.c line 754
  • #26 g_main_dispatch
    at gmain.c line 2441
  • #27 g_main_context_dispatch
    at gmain.c line 3011
  • #28 g_main_context_iterate
    at gmain.c line 3089
  • #29 g_main_loop_run
    at gmain.c line 3297
  • #30 gtk_main
    at gtkmain.c line 1362
  • #31 main
    at main.c line 187

Comment 1 Matthias Clasen 2016-03-06 03:28:32 UTC

*** This bug has been marked as a duplicate of bug 668505 ***