diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-06-23 18:37:21 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-06-23 18:37:21 +0200 |
| commit | 1c482b5dbf38aa38ec323dad0869343a58237245 (patch) | |
| tree | cdfc06298fdbf63644acc60f435b02a5979d1e56 /src/drivers | |
| parent | 9c2d38fe3c636bd92c629a8264b863bff958096e (diff) | |
Wayland: account for old versions of the GTK shell protocol
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index d5850e1a3..80bcaa1a3 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -288,7 +288,8 @@ 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); - gtk_surface1_release(gtk_surface); // very necessary + if (gtk_shell1_get_version(seat->gtk_shell) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) + 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 271895114..5388f6ee9 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1526,7 +1526,8 @@ 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 + if (gtk_shell1_get_version(scr_driver->seat->gtk_shell) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) + gtk_surface1_release(gtk_surface); // very necessary } } |
