01-23-04 10:18 PM
Hi
I'm new to Xwindows programming (tho not to programming itself), and I
have a question involving XReparentWindow(). I'm using XFree86-4.3
What I want is to create a window of a certain size, say 500x500, and
start mplayer (a movie player)in full screen in that window. BUT, I want
mplayer to use 500x500 as it's fullscreen size, and not the size of the
entire screen. In other words, I want mplayer to think the small 500x500
window I've created is the full screen. This must be done transparently.
The user must not have to manually rescale mplayer to the size of the
window. The user must just type -fs (for fullscreen mode) and that must
use the dimensions of the 500x500 window automatically.
At the moment, I'm executing the following sequence of steps:
1. create 500x500 window
2. start mplayer in fullscreen mode
3. reparent mplayer to 500x500 window
The end result is that mplayer uses the dimensions of the entire screen
when going to fullscreen mode, so when it's reparented, I only see a small
portion of the video in the 500x500 window.
I think this happens because mplayer originally starts up as a child of
the root window from which it gets its dimensions for fullscreen mode.
Then when I reparent, it's still using those original settings which is
why I see a clipped version of the video.
So my questions are:
1. How do I get mplayer to use the 500x500 window's dimensions when going
to fullscreen mode? note that mplayer will probably be started from
.xinitrc or some other application, so i can't create the 500x500
window then run exec() from it.
2. Is there a way to trap an event indicating that an application is going
to start running and then force that application to run in the 500x500
window? i.e. force the application to start up originally as a child
window of the 500x500 window, and not of the root window?
Thanks in advance
kodgehopper
kodgehopper at netscape dot/point net
(email specified as above to avoid spam. sorry for the inconveniece)
[ Post a follow-up to this message ]
|