More details about handling modal windows and various gnome versions

This commit is contained in:
ManoloFLTK 2024-05-21 09:23:24 +02:00
parent c5d6382fb1
commit 8807efe939

View File

@ -1517,7 +1517,8 @@ void Fl_Wayland_Window_Driver::makeWindow()
}
if (scr_driver->seat->gtk_shell && pWindow->modal() &&
(new_window->kind == DECORATED || new_window->kind == UNFRAMED)) {
// useful with gnome-shell --version < 45, useless but no harm with version ≥ 46, ? with 45
// Useful to position modal windows above their parent with "gnome-shell --version" ≤ 45.2,
// useless but harmless with "gnome-shell --version" ≥ 46.0.
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);