On Friday 23 March 2007 13:37, Artur Skawina wrote:
> Turns off the decoder when the video window isn't visible (when you switch to
> another
> (virtual) desktop, other windows cover it or screensaver kicks in etc).
>
> Note this will unsuspend on vdr startup when using XV even when the
> previously saved
> config value was 0 - this is probably the desired behaviour; to start XV in
> suspended
> mode make sure the window isn't visible by placing it appropriately (using
> geometry/WM).
>
Thanks for your patch.
We should be prepared to act on VisibilityNotify, but I don't think this should
be done automagically mapped to suspend/resume action.
Comments welcome.
Example:
- 'r' did a suspend action (video and audio stopped).
- touching the window will bring back both.
and switching to another desktop with kde does not deliver
VisibilityFullyObscured :-( .
>
> diff -urp softdevice-cvs.org/video-xv.c softdevice-cvs/video-xv.c
> --- softdevice-cvs.org/video-xv.c 2006-12-18 00:03:46.000000000 +0100
> +++ softdevice-cvs/video-xv.c 2007-03-23 11:09:48.000000000 +0100
> @@ -579,7 +579,8 @@ void cXvVideoOut::ProcessEvents ()
> KeyPressMask |
> ExposureMask |
> ConfigureNotify |
> - StructureNotifyMask,
> + StructureNotifyMask |
> + VisibilityChangeMask,
> &event))
> {
> switch (event.type)
> @@ -703,6 +704,11 @@ void cXvVideoOut::ProcessEvents ()
> }
> break;
>
> + case VisibilityNotify:
> + EVDEB("VisibilityNotify\n");
> + setupStore->shouldSuspend =
> event.xvisibility.state==VisibilityFullyObscured;
> + break;
> +
> case MapNotify:
> EVDEB("MapNotify\n");
> map_count++;
> @@ -920,7 +926,8 @@ bool cXvVideoOut::Initialize (void)
>
> XSelectInput(dpy, win, KeyPressMask | ExposureMask |
> ConfigureNotify | StructureNotifyMask |
> - PointerMotionMask | ButtonPressMask);
> + PointerMotionMask | ButtonPressMask |
> + VisibilityChangeMask);
>
> XMapRaised(dpy, win);
> //XNextEvent(dpy, &event);
>
>
--
Stefan Lucke
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel