wayland: remove old sway/wlroots hack

It's actually been like this for years, but wlroots doesn't keep track
of resizes a client does independent of the compositor. When using sway,
this leads to weird behavior with floating clients resizing themselves
back to the old size if you unfocus it. mpv has been working around this
for a long time, but it's really annoying to selectively ignore events
based on a weird heuristic. Since Sway finally fixed this bug, let's go
ahead and drop this crap. Note that other wlroots compositors may
possibly experience a regression if they didn't correct for this like
sway does, but it's for their own good.
This commit is contained in:
Dudemanguy 2023-07-15 23:17:39 -05:00
parent 4375a26e3c
commit 76472e1ba8
2 changed files with 0 additions and 11 deletions

View File

@ -1040,11 +1040,6 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
width = height = 0;
}
int old_toplevel_width = wl->toplevel_width;
int old_toplevel_height = wl->toplevel_height;
wl->toplevel_width = width;
wl->toplevel_height = height;
if (!wl->configured) {
/* Save initial window size if the compositor gives us a hint here. */
bool autofit_or_geometry = vo_opts->geometry.wh_valid || vo_opts->autofit.wh_valid ||
@ -1144,10 +1139,6 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
goto resize;
}
if (old_toplevel_width == wl->toplevel_width &&
old_toplevel_height == wl->toplevel_height)
return;
if (!wl->locked_size) {
if (vo_opts->keepaspect) {
double scale_factor = (double)width / wl->reduced_width;

View File

@ -64,8 +64,6 @@ struct vo_wayland_state {
int bounded_width;
int reduced_height;
int reduced_width;
int toplevel_width;
int toplevel_height;
/* State */
bool activated;