summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-08-06 11:47:16 -0500
committerDudemanguy <random342@airmail.cc>2021-08-06 11:53:59 -0500
commit19c4ae004a14617c8ecff191119723d0b7731b0c (patch)
treeeb69a380633c2499fe590d9a7e000f43a7d102c7 /video/out/wayland_common.h
parent7eb34d237699f82fc1764cb5d5d70c530cee2321 (diff)
downloadmpv-19c4ae004a14617c8ecff191119723d0b7731b0c.tar.bz2
mpv-19c4ae004a14617c8ecff191119723d0b7731b0c.tar.xz
wayland: keep track of toplevel width/height again
Regression from 24357cb. It's ugly but unfortunately keeping tracking of the last toplevel width and height really is the best way to solve this problem and removing it was a mistake. Compositors don't always send width/height coordinates of the actual window. The easiest way to trigger this is by changing window-scale/current-window-scale and then unfocusing the window. The compositor will send another toplevel configure event with coordinates of the window before the resize. Maybe compositors could be smarter but multiple ones do this (sway, gnome, plasma), so just keep the old workaround. The only difference this time is that the toplevel width/height is saved at the very beginning which also covers the case where it equals 0 (i.e. weston).
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 23dfd81294..b77bab462b 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -50,6 +50,8 @@ struct vo_wayland_state {
int gcd;
int reduced_height;
int reduced_width;
+ int toplevel_width;
+ int toplevel_height;
/* State */
bool activated;