summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-15 23:17:39 -0500
committerDudemanguy <random342@airmail.cc>2024-02-26 15:51:16 +0000
commit76472e1ba8efd04b0eab765c88e97ac5e0c9c51a (patch)
tree56b2ecf2e936b4496dd991bd28874df4b891adaf /video/out/wayland_common.c
parent4375a26e3c7ae289b9f49c3b266ccf829500cd42 (diff)
downloadmpv-76472e1ba8efd04b0eab765c88e97ac5e0c9c51a.tar.bz2
mpv-76472e1ba8efd04b0eab765c88e97ac5e0c9c51a.tar.xz
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.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r--video/out/wayland_common.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index a36076b708..e6b38f868b 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -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;