summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-15 19:47:34 +0100
committerwm4 <wm4@nowhere>2013-03-03 14:19:57 +0100
commit1b09f46338fff38b0d442f187a4ce0513a095baa (patch)
tree6ab2ef9ad93c578a5430b5335418c9b463291434 /video/out/x11_common.h
parent152a2024cf271377005897974a2b0dc58a4dffa5 (diff)
downloadmpv-1b09f46338fff38b0d442f187a4ce0513a095baa.tar.bz2
mpv-1b09f46338fff38b0d442f187a4ce0513a095baa.tar.xz
x11_common: use private variables for window state
Store the window state (position and size) in vo_x11_state, instead of in vo->dx/dy/dwidth/dheight. The VO variables are overwritten by vo.c on every vo_config() call, which is extremely not helpful. Now vo->dx/dy are mostly unused (except for passing the position forced by the --geometry option), and vo->dwidth/dheight are set for the VO, and otherwise read for resize detection only. In the long term, the way vo_config() handles the --geometry option should be changed, and vo->dx/dy should be removed. Remove some useless stuff: VO_EVENT_MOVE and VO_EVENT_KEYPRESS were generated, but unused. Wayland changes by Alexander Preisinger.
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index 57db73b847..630d576b77 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -64,6 +64,14 @@ struct vo_x11_state {
int vo_old_width;
int vo_old_height;
+ // Current actual window position (updated on window move/resize events).
+ int win_x;
+ int win_y;
+ unsigned int win_width;
+ unsigned int win_height;
+
+ int pending_vo_events;
+
/* Keep track of original video width/height to determine when to
* resize window when reconfiguring. Resize window when video size
* changes, but don't force window size changes as long as video size