From 1b09f46338fff38b0d442f187a4ce0513a095baa Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 15 Feb 2013 19:47:34 +0100 Subject: 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. --- video/out/wayland_common.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 6904d3edb5..149e304956 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -319,7 +319,6 @@ static void keyboard_handle_key(void *data, int mpkey = lookupkey(sym); if (mpkey) mplayer_put_key(wl->vo->key_fifo, mpkey); - input->events |= VO_EVENT_KEYPRESS; } if (state == WL_KEYBOARD_KEY_STATE_RELEASED && key == input->repeat.key) { @@ -952,7 +951,6 @@ int vo_wayland_check_events (struct vo *vo) int i, ret, count; struct epoll_event ep[16]; - wl->input->events = 0; wl_display_dispatch_pending(wl->display->display); ret = wl_display_flush(wl->display->display); @@ -975,10 +973,8 @@ int vo_wayland_check_events (struct vo *vo) task->run(task, ep[i].events, wl); } - ret = wl->input->events; - ret |= wl->window->events; + ret = wl->window->events; - wl->input->events = 0; wl->window->events = 0; return ret; -- cgit v1.2.3