summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-04 16:53:10 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-04 16:53:10 +0200
commit651d9f3e7960fc17d0ab1b27830d160fac1be132 (patch)
tree167f71c07195a91d9c4e98e87e882f07420a5783 /src
parente2eeb368839d226e763aa917902444a4f892c6c3 (diff)
Wayland: add necessary calls to gtk_surface1_release()
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx4
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 647a1b461..98fcc5b8e 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -285,10 +285,10 @@ static void pointer_button(void *data,
(struct Fl_Wayland_Screen_Driver::seat*)data;
if (gtk_shell_surface && state == WL_POINTER_BUTTON_STATE_PRESSED &&
button == BTN_MIDDLE) {
- struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(seat->gtk_shell,
- gtk_shell_surface);
+ 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);
+ 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 467e985ef..9546fde94 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1525,6 +1525,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(scr_driver->seat->gtk_shell,
new_window->wl_surface);
gtk_surface1_set_modal(gtk_surface);
+ gtk_surface1_release(gtk_surface); // very necessary
}
}