# HG changeset patch # User reimar # Date 1329073399 0 # Node ID f9f91ba805b9cb89a9204171088474978cca878c # Parent b2c3288a3483fff33558612e532ecf75ceeed439 SDL: add support for setting window position. Currently only works with -vo gl since -vo sdl does not yet call geometry(). diff -r b2c3288a3483 -r f9f91ba805b9 libvo/sdl_common.c --- a/libvo/sdl_common.c Sun Feb 12 18:52:38 2012 +0000 +++ b/libvo/sdl_common.c Sun Feb 12 19:03:19 2012 +0000 @@ -25,6 +25,7 @@ #include "input/input.h" #include "input/mouse.h" #include "video_out.h" +#include "geometry.h" static int old_w; static int old_h; @@ -121,6 +122,11 @@ #endif if (!vo_border) flags |= SDL_NOFRAME; + if (geometry_xy_changed) { + char envstr[20]; + snprintf(envstr, sizeof(envstr), "%i,%i", vo_dx, vo_dy); + setenv("SDL_VIDEO_WINDOW_POS", envstr, 1); + } s = SDL_SetVideoMode(vo_dwidth, vo_dheight, bpp, flags); if (!s) { mp_msg(MSGT_VO, MSGL_FATAL, "SDL SetVideoMode failed: %s\n", SDL_GetError());