> Send Freevo-devel mailing list submissions to > freevo-devel@lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/freevo-devel > Jelle Plantenberg wrote: >> Hi all, >> >> I'm trying to get freevo to open up at a pre-defined window position. So >> far, I've scanned the pygame code and it seems that this libary doesn't >> support setting the size as well as the offset of a new window. >> >> As a workaround, I made a small script which runs as >> OSD_SDL_EXEC_AFTER_STARTUP, that uses "xwit -move X Y -names Freevo" to >> move the window. This works fine, but reveals a slight inconsistency >> between playing a movie and playing a game. >> >> When playing a movie, you can select freevo to either keep its window or >> close and open (OSD_STOP_WHEN_PLAYING), but for games it always closes >> the >> freevo window. >> >> As a fix, I've included: >> if config.OSD_SDL_EXEC_AFTER_STARTUP: >> os.system(OSD_SDL_EXEC_AFTER_STARTUP) >> in the osd.py:restart() function. But I'm in doubt whether this is >> desired >> behavior (I would say not actually). >> >> Am I missing a more elegant/straightforward way of positioning the >> freevo >> window? > > You are referring to freevo-1.x series? > > I suspect that the intention of pygame is that it runs full screen, as > most games do. > > You can certainly position and size a surface. > > If you are trying to position the window then it is a function of the > window manager and these usually have some functionality to do this. > pygame is used to position a surface with in a window. > > Hopefully, I've understood your problem, but it's getting late... > > Duncan > >
Hi Duncan, Thanks for the feedback. Yes, I was referring to 1.7.3 (.4 seems to have the same code in these places). With mplayer, you can use -geometry XxY+A+B to create a window on A,B of size X,Y. Such functionality is not included in pygame it seems (although this may even be inherited from SDL). To get around this, I patched the source to call a script at each call to osd.py:restart(), but the OSD_SDL_EXEC_AFTER_STARTUP trigger seems inappropriate for this. If there is no other way to position it, a solution would be to include another OSD_SDL_EXEC_AFTER_RESTART, but this may generate more clutter than it solves. Another option is to obey OSD_STOP_WHEN_PLAYING during gameplay as well as during video playback. What do you think? Cheers, Jelle. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel