summaryrefslogtreecommitdiff
path: root/libdecor/src/plugins
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-10 16:52:46 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-05-10 16:52:46 +0200
commitb6e0122926b9bae1b9400ba3bf01e5b7d977b758 (patch)
tree07970ff1bf2123ffbb27d88b08623b17050b48e4 /libdecor/src/plugins
parentad27da578a952548dd16f8be4bbd871fccc423c7 (diff)
Fix for issue #441: Some minor regressions with borderless+fullscreen (Wayland).
Diffstat (limited to 'libdecor/src/plugins')
-rw-r--r--libdecor/src/plugins/gtk/libdecor-gtk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libdecor/src/plugins/gtk/libdecor-gtk.c b/libdecor/src/plugins/gtk/libdecor-gtk.c
index e23115c23..40f7d5954 100644
--- a/libdecor/src/plugins/gtk/libdecor-gtk.c
+++ b/libdecor/src/plugins/gtk/libdecor-gtk.c
@@ -670,7 +670,7 @@ libdecor_plugin_gtk_frame_free(struct libdecor_plugin *plugin,
(struct libdecor_frame_gtk *) frame;
#if APPLY_FLTK_CHANGES
- if (!frame_gtk->header) return; /* happens with SSD */
+ if (!frame_gtk->header || !GTK_IS_WIDGET(frame_gtk->header)) return; /* happens with SSD (or not)*/
#endif
gtk_widget_destroy(frame_gtk->header);
#if APPLY_FLTK_CHANGES
@@ -1783,7 +1783,11 @@ libdecor_plugin_gtk_frame_get_border_size(struct libdecor_plugin *plugin,
GtkWidget *header = ((struct libdecor_frame_gtk *)frame)->header;
enum decoration_type type = window_state_to_decoration_type(window_state);
- if (header && (type != DECORATION_TYPE_NONE))
+ if (header && (type != DECORATION_TYPE_NONE)
+#if APPLY_FLTK_CHANGES
+ && GTK_IS_WIDGET(header)
+#endif
+ )
*top = gtk_widget_get_allocated_height(header);
else
*top = 0;
@@ -2298,7 +2302,7 @@ pointer_button(void *data,
state == WL_POINTER_BUTTON_STATE_PRESSED &&
seat->pointer_focus == frame_gtk->headerbar.wl_surface) {
#if APPLY_FLTK_CHANGES
- const int title_height = frame_gtk->header ? gtk_widget_get_allocated_height(frame_gtk->header) : 0;
+ const int title_height = frame_gtk->header && GTK_IS_WIDGET(frame_gtk->header) ? gtk_widget_get_allocated_height(frame_gtk->header) : 0;
#else
const int title_height = gtk_widget_get_allocated_height(frame_gtk->header);
#endif