Mercurial > mplayer.hg
comparison libvo/vo_xv.c @ 18116:d75953576ae4
Fix and improve xinerama support
author | reimar |
---|---|
date | Sun, 16 Apr 2006 13:38:28 +0000 |
parents | 3ff863e54b93 |
children | a107276371a8 |
comparison
equal
deleted
inserted
replaced
18115:5e0bafa6f7e8 | 18116:d75953576ae4 |
---|---|
188 vo_mouse_autohide = 1; | 188 vo_mouse_autohide = 1; |
189 | 189 |
190 int_pause = 0; | 190 int_pause = 0; |
191 visible_buf = -1; | 191 visible_buf = -1; |
192 | 192 |
193 update_xinerama_info(); | |
193 vo_dx = (vo_screenwidth - d_width) / 2; | 194 vo_dx = (vo_screenwidth - d_width) / 2; |
194 vo_dy = (vo_screenheight - d_height) / 2; | 195 vo_dy = (vo_screenheight - d_height) / 2; |
195 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, | 196 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, |
196 vo_screenheight); | 197 vo_screenheight); |
198 vo_dx += xinerama_x; | |
199 vo_dy += xinerama_y; | |
197 vo_dwidth = d_width; | 200 vo_dwidth = d_width; |
198 vo_dheight = d_height; | 201 vo_dheight = d_height; |
199 | 202 |
200 #ifdef HAVE_XF86VM | 203 #ifdef HAVE_XF86VM |
201 if (flags & VOFLAG_MODESWITCHING) | 204 if (flags & VOFLAG_MODESWITCHING) |
220 xv_format = fo[i].id; | 223 xv_format = fo[i].id; |
221 } | 224 } |
222 if (!xv_format) | 225 if (!xv_format) |
223 return -1; | 226 return -1; |
224 } | 227 } |
225 aspect_save_screenres(vo_screenwidth, vo_screenheight); | |
226 | 228 |
227 #ifdef HAVE_NEW_GUI | 229 #ifdef HAVE_NEW_GUI |
228 if (use_gui) | 230 if (use_gui) |
229 guiGetEvent(guiSetShVideo, 0); // let the GUI to setup/resize our window | 231 guiGetEvent(guiSetShVideo, 0); // let the GUI to setup/resize our window |
230 else | 232 else |
346 NULL, 0, &hint); | 348 NULL, 0, &hint); |
347 vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0); | 349 vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0); |
348 XMapWindow(mDisplay, vo_window); | 350 XMapWindow(mDisplay, vo_window); |
349 if (flags & VOFLAG_FULLSCREEN) | 351 if (flags & VOFLAG_FULLSCREEN) |
350 vo_x11_fullscreen(); | 352 vo_x11_fullscreen(); |
351 else | |
352 { | |
353 #ifdef HAVE_XINERAMA | |
354 vo_x11_xinerama_move(mDisplay, vo_window); | |
355 #endif | |
356 } | |
357 } else | 353 } else |
358 { | 354 { |
359 // vo_fs set means we were already at fullscreen | 355 // vo_fs set means we were already at fullscreen |
360 vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0); | 356 vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0); |
361 if (!vo_fs) | 357 if (!vo_fs) |