From 0bb559c803eaecf751114beca2179410f9f20041 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:52:08 +0200 Subject: Wayland: account for old versions of the GTK shell protocol - cont'd Not easy to get it right in absence of any documentation for "GTK Shell" protocol. --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 +-- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index c06db00b9..d5850e1a3 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -288,8 +288,7 @@ static void pointer_button(void *data, struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(seat->gtk_shell,gtk_shell_surface); gtk_surface1_titlebar_gesture(gtk_surface, serial, seat->wl_seat, GTK_SURFACE1_GESTURE_MIDDLE_CLICK); - if (gtk_surface1_get_version(gtk_surface) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) - gtk_surface1_release(gtk_surface); // very necessary + gtk_surface1_release(gtk_surface); // very necessary return; } seat->serial = serial; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 07076bb0a..5e343268d 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1528,6 +1528,8 @@ void Fl_Wayland_Window_Driver::makeWindow() gtk_surface1_set_modal(gtk_surface); if (gtk_surface1_get_version(gtk_surface) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) gtk_surface1_release(gtk_surface); // very necessary + else + gtk_surface1_destroy(gtk_surface); } } -- cgit v1.2.3