diff options
author | wm4 <wm4@nowhere> | 2013-02-15 19:47:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-03 14:19:57 +0100 |
commit | 1b09f46338fff38b0d442f187a4ce0513a095baa (patch) | |
tree | 6ab2ef9ad93c578a5430b5335418c9b463291434 /video/out/w32_common.c | |
parent | 152a2024cf271377005897974a2b0dc58a4dffa5 (diff) | |
download | mpv-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/w32_common.c')
-rw-r--r-- | video/out/w32_common.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 031bd0be67..ab467135cc 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -131,7 +131,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, w32->event_flags |= VO_EVENT_EXPOSE; break; case WM_MOVE: { - w32->event_flags |= VO_EVENT_MOVE; POINT p = {0}; ClientToScreen(w32->window, &p); w32->window_x = p.x; @@ -295,7 +294,6 @@ int vo_w32_check_events(struct vo *vo) ClientToScreen(w32->window, &p); if (p.x != w32->window_x || p.y != w32->window_y) { w32->window_x = p.x; w32->window_y = p.y; - w32->event_flags |= VO_EVENT_MOVE; } res = GetClientRect(WIN_ID_TO_HWND(WinID), &r); if (res && (r.right != vo->dwidth || r.bottom != vo->dheight)) |