=== modified file 'src/native-state-wayland.cpp'
@@ -54,6 +54,8 @@
if (window_) {
if (window_->shell_surface)
wl_shell_surface_destroy(window_->shell_surface);
+ if (window_->opaque_reqion)
+ wl_region_destroy(window_->opaque_reqion);
if (window_->surface)
wl_surface_destroy(window_->surface);
if (window_->native)
@@ -233,6 +235,13 @@
window_->native = wl_egl_window_create(window_->surface,
properties.width, properties.height);
}
+
+ window_->opaque_reqion = wl_compositor_create_region(display_->compositor);
+ wl_region_add(window_->opaque_reqion, 0, 0,
+ window_->properties.width,
+ window_->properties.height);
+ wl_surface_set_opaque_region(window_->surface, window_->opaque_reqion);
+
window_->shell_surface = wl_shell_get_shell_surface(display_->shell,
window_->surface);
=== modified file 'src/native-state-wayland.h'
@@ -106,6 +106,7 @@
struct my_window {
WindowProperties properties;
struct wl_surface *surface;
+ struct wl_region *opaque_reqion;
struct wl_egl_window *native;
struct wl_shell_surface *shell_surface;
} *window_;