diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-20 10:06:43 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-20 10:06:43 +0200 |
| commit | 8d79e4ad43a1ec3814033e1e2529d909ee8293d4 (patch) | |
| tree | 608955a309c2a1f21a802478c58f55cc9b44fa49 /src | |
| parent | 385cabf3aac721d6a4c1f499f9fc4955c4c805f9 (diff) | |
Inform Wayland compositor that most FLTK windows are opaque
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index d13386ec7..be8fe74ac 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1160,6 +1160,13 @@ void Fl_Wayland_Window_Driver::makeWindow() new_window->wl_surface = wl_compositor_create_surface(scr_driver->wl_compositor); //Fl::warning("makeWindow:%p wayland-scale=%d user-scale=%.2f\n", pWindow, new_window->scale, Fl::screen_scale(0)); wl_surface_add_listener(new_window->wl_surface, &surface_listener, new_window); + + if (!shape()) { // rectangular FLTK windows are opaque + struct wl_region *opaque = wl_compositor_create_region(scr_driver->wl_compositor); + wl_region_add(opaque, 0, 0, 1000000, 1000000); + wl_surface_set_opaque_region(new_window->wl_surface, opaque); + wl_region_destroy(opaque); + } if (pWindow->user_data() == &Fl_Screen_Driver::transient_scale_display && Fl::first_window()) { // put transient scale win at center of top window by making it a child of top |
