wayland: Set xdg surface geometry
It was previously thought that these function calls were unnecessary as the initial bug and reproduction case that necessitated their addition seemed to be fixed, but apparently there are still cases where this needs to be set explicitly. Set the xdg surface geometry at creation time and when the window size changes. Partially reverts #6361. This is not needed in the libdecor path, as libdecor calls this for the content surface internally.main
parent
618340bf99
commit
90a964f132
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue