diff options
| -rw-r--r-- | libdecor/src/plugins/gtk/libdecor-gtk.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libdecor/src/plugins/gtk/libdecor-gtk.c b/libdecor/src/plugins/gtk/libdecor-gtk.c index ba7e45657..9a0084a40 100644 --- a/libdecor/src/plugins/gtk/libdecor-gtk.c +++ b/libdecor/src/plugins/gtk/libdecor-gtk.c @@ -662,9 +662,8 @@ libdecor_plugin_gtk_frame_free(struct libdecor_plugin *plugin, struct libdecor_frame_gtk *frame_gtk = (struct libdecor_frame_gtk *) frame; -#if APPLY_FLTK_CHANGES - if (!GTK_IS_WIDGET(frame_gtk->header)) return; /* happens with SSD (or not)*/ -#endif + /* when in SSD mode, frame_gtk->header is not a proper GTK widget */ + if (!GTK_IS_WIDGET(frame_gtk->header)) return; gtk_widget_destroy(frame_gtk->header); gtk_widget_destroy(frame_gtk->window); @@ -1519,12 +1518,15 @@ libdecor_plugin_gtk_frame_property_changed(struct libdecor_plugin *plugin, { struct libdecor_frame_gtk *frame_gtk = (struct libdecor_frame_gtk *) frame; -#if APPLY_FLTK_CHANGES - if (!GTK_IS_WIDGET(frame_gtk->header)) return; -#endif bool redraw_needed = false; const char *new_title; + /* + * when in SSD mode, the window title is not to be managed by GTK; + * this is detected by frame_gtk->header not being a proper GTK widget + */ + if (!GTK_IS_WIDGET(frame_gtk->header)) return; + new_title = libdecor_frame_get_title(frame); if (!streq(frame_gtk->title, new_title)) redraw_needed = true; |
