# HG changeset patch # User reimar # Date 1278014419 0 # Node ID 09e7a988ab93a73227e4f4e15808f34a15473967 # Parent 8e5ba4ae7c36aa78582b9072d4813b368b614564 Fix resizing with -wid after previous commit. diff -r 8e5ba4ae7c36 -r 09e7a988ab93 libvo/x11_common.c --- a/libvo/x11_common.c Thu Jul 01 19:59:42 2010 +0000 +++ b/libvo/x11_common.c Thu Jul 01 20:00:19 2010 +0000 @@ -794,6 +794,16 @@ static unsigned int mouse_timer; static int mouse_waiting_hide; +static int check_resize(void) +{ + int old_w = vo_dwidth, old_h = vo_dheight; + int old_x = vo_dx, old_y = vo_dy; + vo_x11_update_geometry(); + if (vo_dwidth != old_w || vo_dheight != old_h || vo_dx != old_x || vo_dy != old_y) + return VO_EVENT_RESIZE; + return 0; +} + int vo_x11_check_events(Display * mydisplay) { int ret = 0; @@ -810,6 +820,8 @@ mouse_waiting_hide = 0; } + if (WinID > 0) + ret |= check_resize(); while (XPending(mydisplay)) { XNextEvent(mydisplay, &Event); @@ -832,13 +844,7 @@ // if (vo_fs && Event.xconfigure.width != vo_screenwidth && Event.xconfigure.height != vo_screenheight) break; if (vo_window == None) break; - { - int old_w = vo_dwidth, old_h = vo_dheight; - int old_x = vo_dx, old_y = vo_dy; - vo_x11_update_geometry(); - if (vo_dwidth != old_w || vo_dheight != old_h || vo_dx != old_x || vo_dy != old_y) - ret |= VO_EVENT_RESIZE; - } + ret |= check_resize(); break; case KeyPress: {