mirror of https://github.com/mpv-player/mpv
set_window() fixing detection of changement of the window position
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6300 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
635c290556
commit
cf0e1967a3
|
@ -67,6 +67,7 @@ static uint32_t image_format;
|
||||||
static uint32_t image_depth;
|
static uint32_t image_depth;
|
||||||
|
|
||||||
/* Window parameters */
|
/* Window parameters */
|
||||||
|
static uint32_t window_x, window_y;
|
||||||
static uint32_t window_width, window_height;
|
static uint32_t window_width, window_height;
|
||||||
|
|
||||||
/* used by XGetGeometry & XTranslateCoordinates for moving/resizing window */
|
/* used by XGetGeometry & XTranslateCoordinates for moving/resizing window */
|
||||||
|
@ -135,9 +136,12 @@ static void set_window(int force_update,const vo_tune_info_t *info)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set new values in VIDIX */
|
/* set new values in VIDIX */
|
||||||
if (force_update || (vo_dx != drwcX) || (vo_dy != drwcY) ||
|
if (force_update || (window_x != drwcX) || (window_y != drwcY) ||
|
||||||
(window_width != drwWidth) || (window_height != drwHeight))
|
(window_width != drwWidth) || (window_height != drwHeight))
|
||||||
{
|
{
|
||||||
|
// do a backup of window coordinates
|
||||||
|
window_x = drwcX;
|
||||||
|
window_y = drwcY;
|
||||||
vo_dx = drwcX;
|
vo_dx = drwcX;
|
||||||
vo_dy = drwcY;
|
vo_dy = drwcY;
|
||||||
window_width = drwWidth;
|
window_width = drwWidth;
|
||||||
|
|
Loading…
Reference in New Issue