[MPlayer-dev-eng] [RFC] kde screensaver stuff using system()
atlka at pg.gda.pl
Thu Feb 8 09:14:54 CET 2007
Dnia Wed, 7 Feb 2007 18:24:29 +0100
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> napisał(a):
> On Wed, Feb 07, 2007 at 01:35:22PM +0100, Adam Tla??ka wrote:
> > Using XWarpPointer(3X11) function you do not need to use any special
> > Xserver extension and it should work with any screensaver and raw
> > Xserver DPMS settings too.
> > So for example XwarpPointer(display, window, None, 0, 0,
> > window_width, window_height, distx, 0); moves the mouse pointer
> > relatively to its current position only if it is inside my window.
> > We can set
> So if the mouse pointer is outside the window it will not work?
> On my ubuntu even in fullscreen mode the taskbar is not covered, so if
> somehow your mouse ends up there it won't work anymore.
It depends on usage of XWarpPointer(3X11) function. If you set src_w
to None the mouse pointer could be anywhere on the screen and it will
work. I found it more usable to activate this hack only if mouse
pointer is inside mplayer window but of course it is not mandatory.
> I also have seen some window managers where pressing 'f' to go to
> fullscreen brings MPlayer to fullscreen above all other windows but
> the focus remains on the console window. Would this approach work
Focus setting has nothing to do here. If I use XWarpPointer(dpy, None,
None, 0, 0, 0, 0, mx, 0) for example and mx = 16 then mx = -mx in a
loop it works always not depending on which window is focused, which is
on top or mapped.
> And what happens when the user right-clicks to activate the Gui menu?
> Or just moves the mouse to the bottom to activate the
> whatever-it-is-called in fullscreen mode?
If we detect mouse movement different from desired or other mouse event
(any other then moving) or key event we could first switch off fake
mouse movements and then just serve the event. From my point of view
if could be done together with mouse pointer hidding/unhidding function.
Generally I see no problem here.
> I somehow doubt it will do more than "work almost" - i.e. like the
> current solution but with less code.
It works IMHO and it's worth to try this solution.
Adam Tlałka mailto:atlka at pg.gda.pl ^v^ ^v^ ^v^
More information about the MPlayer-dev-eng