|
@@ -277,10 +277,16 @@ static void ConfigureWindowGeometry(SDL_Window *window)
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
- * The opaque and pointer confinement regions only need to be recalculated
|
|
|
- * if the output size has changed.
|
|
|
+ * The surface geometry, opaque region and pointer confinement region only
|
|
|
+ * need to be recalculated if the output size has changed.
|
|
|
*/
|
|
|
if (window_size_changed) {
|
|
|
+ /* libdecor does this internally on frame commits, so it's only needed for xdg surfaces. */
|
|
|
+ if (data->shell_surface_type != WAYLAND_SURFACE_LIBDECOR &&
|
|
|
+ viddata->shell.xdg && data->shell_surface.xdg.surface != NULL) {
|
|
|
+ xdg_surface_set_window_geometry(data->shell_surface.xdg.surface, 0, 0, data->window_width, data->window_height);
|
|
|
+ }
|
|
|
+
|
|
|
if (!viddata->egl_transparency_enabled) {
|
|
|
region = wl_compositor_create_region(viddata->compositor);
|
|
|
wl_region_add(region, 0, 0,
|
|
@@ -1317,6 +1323,9 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
|
|
|
&decoration_listener,
|
|
|
window);
|
|
|
}
|
|
|
+
|
|
|
+ /* Set the geometry */
|
|
|
+ xdg_surface_set_window_geometry(data->shell_surface.xdg.surface, 0, 0, data->window_width, data->window_height);
|
|
|
} else {
|
|
|
/* Nothing to see here, just commit. */
|
|
|
wl_surface_commit(data->surface);
|