Wayland: account for old versions of the GTK shell protocol - cont'd

This commit is contained in:
ManoloFLTK 2024-06-24 09:30:07 +02:00
parent 1c482b5dbf
commit 8250cc7f7b
2 changed files with 2 additions and 2 deletions

View File

@ -288,7 +288,7 @@ static void pointer_button(void *data,
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_titlebar_gesture(gtk_surface, serial, seat->wl_seat,
GTK_SURFACE1_GESTURE_MIDDLE_CLICK); GTK_SURFACE1_GESTURE_MIDDLE_CLICK);
if (gtk_shell1_get_version(seat->gtk_shell) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) 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; return;
} }

View File

@ -1526,7 +1526,7 @@ void Fl_Wayland_Window_Driver::makeWindow()
struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(scr_driver->seat->gtk_shell, struct gtk_surface1 *gtk_surface = gtk_shell1_get_gtk_surface(scr_driver->seat->gtk_shell,
new_window->wl_surface); new_window->wl_surface);
gtk_surface1_set_modal(gtk_surface); gtk_surface1_set_modal(gtk_surface);
if (gtk_shell1_get_version(scr_driver->seat->gtk_shell) >= GTK_SURFACE1_RELEASE_SINCE_VERSION) 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
} }
} }