mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
The user-visible issue is that newly-mapped xdg-shell* windows would
sometimes start with their top-left-corner, rather than their center, in
the center of the screen. This is because get_size() would
conservatively fall back on (width, height) == (0, 0) if both
set_window_geometry() had not been called, and it found
view->wlr_surface to be NULL.
But, view->wlr_surface is only set to non-NULL in view_map(). We call
get_size() before this. Fortunately, the wlr_surface in question is
accessible via view->xdg_shell{,_v6}->surface, so always fall back on
that. We can assert its presence instead of further falling back on
(width, height) == (0, 0).
Signed-off-by: Genki Sky <sky@genki.is>
|
||
|---|---|---|
| .. | ||
| config.c | ||
| cursor.c | ||
| desktop.c | ||
| ini.c | ||
| input.c | ||
| keyboard.c | ||
| layer_shell.c | ||
| main.c | ||
| meson.build | ||
| output.c | ||
| rootston.ini.example | ||
| seat.c | ||
| virtual_keyboard.c | ||
| wl_shell.c | ||
| xdg_shell.c | ||
| xdg_shell_v6.c | ||
| xwayland.c | ||