FLTK logo

[master] fac3c2f - libdecor GTK plugin: update from upstream (8 Jun 2022 - de9534d2) Two more FLTK changes become unneeded.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] fac3c2f - libdecor GTK plugin: update from upstream (8 Jun 2022 - de9534d2) Two more FLTK changes become unneeded. "ManoloFLTK" Jun 08, 2022  
 
commit fac3c2fb043f778a108a0a939f581063a3dec81a
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Jun 8 13:58:28 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Jun 8 13:58:28 2022 +0200

    libdecor GTK plugin: update from upstream (8 Jun 2022 - de9534d2)
    Two more FLTK changes become unneeded.

 libdecor/src/plugins/gtk/libdecor-gtk.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git libdecor/src/plugins/gtk/libdecor-gtk.c libdecor/src/plugins/gtk/libdecor-gtk.c
index ba7e456..9a0084a 100644
--- libdecor/src/plugins/gtk/libdecor-gtk.c
+++ 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;
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.