Problems with NET_WM_STATE_FULLSCREEN

Olivier Fourdan fourdan at xfce.org
Sat Oct 4 18:56:55 CEST 2003


Hi,

Ok, reading your mail again (sorry, I'm really sick today...), I've
undertood what you meant...

Use this instead:

            [...]
1047        clientCoordGravitate (c, APPLY, &wc.x, &wc.y);
1048        if (CLIENT_FLAG_TEST (c, CLIENT_FLAG_FULLSCREEN))
1049        {
1050            int cx, cy;
1051
1052            /* size request from fullscreen windows get fullscreen*/
1053            
1054            cx = frameX (c) + (frameWidth (c) / 2);
1055            cy = frameY (c) + (frameHeight (c) / 2);
1056
1057            wc.x = MyDisplayX (cx, cy);
1058            wc.y = MyDisplayY (cx, cy);
1059            wc.width = MyDisplayWidth (dpy, screen, cx, cy);
1060            wc.height = MyDisplayHeight (dpy, screen, cx, cy);
1061
1062            ev->value_mask |= (CWX | CWY | CWWidth | CWHeight);
1063        }
1064        /* Clean up buggy requests that set all flags */
            [...]


This one is Xinerama aware. This is what I shall commit.

Cheers,
Olivier.

On Sat, 2003-10-04 at 18:07, Olivier Fourdan wrote:
> Hi,
> 
> Ok, reading the comment in the patch, I think to ignore the request,
> it's better to clean up CWWidth and CWHeight flags, something like:
> 
>             [...]
> 1047        clientCoordGravitate (c, APPLY, &wc.x, &wc.y);
> 1048        /* Clean up buggy requests that set all flags */
> 1049        if (CLIENT_FLAG_TEST (c, CLIENT_FLAG_FULLSCREEN))
> 1050        {
> 1051            /* Ignore requested size for FULLSCREEN windows */
> 1052            ev->value_mask &= ~(CWWidth | CWHeight);
> 1053        }
>             [...]
> 
> Please tell me if that make any difference. If not, I would prefer using
> this (as it doesn't break anything, it doesn't interefere with the
> values passed by the request, it simply ignore them)
> 
> Cheers,
> Olivier.
> 
> On Sat, 2003-10-04 at 17:58, Olivier Fourdan wrote: 
> > Hi Arwed,
> > 
> > Reviewing the second patch (ignore-request-size.patch), I noticed it is
> > not Xinerama aware. Is that on purpose?
> > 
> > I mean, an application switching to fullscreen should not be splitted
> > accross all physical screens IMO. But I don't know how gst would handle
> > that. Is it Xinerama aware?
> > 
> > I'll see if I can improve that one.
> > 
> > Cheers,
> > Olivier.
> > 
> > On Sat, 2003-10-04 at 12:23, Arwed von Merkatz wrote:
> > > Hi,
> > > 
> > > i found two problems with the handling of NET_WM_STATE_FULLSCREEN
> > > windows in xfwm4 4.0.0, both exposed by gst-player (www.gstreamer.net).
> > > 
> > > 1. when going fullscreen, gst-player relies on the
> > > NET_WM_STATE_FULLSCREEN flag being set when it receives a configure
> > > event to determine whether it should show its menu bar or not. XFwm4
> > > sets the state after sending the configure event, so gst-players menu
> > > bar is still shown in fullscreen mode. The attached set-state.patch
> > > fixes this, i don't think that could lead to negative side effects (i
> > > haven't noticed any :)
> > > 
> > > 2. when starting to play a video in fullscreen mode, gst-player creates
> > > a new xvideo window and reparents that into the existing window. Doing
> > > this it requests a minimum size for the window and expects to get the
> > > full screen size allocated (it doesn't know about the size of the full
> > > screen, so it can't request it). The attached ignore-request-size.patch
> > > fixes this by ignoring the requested size for windows that have the
> > > FULLSCREEN flag set, allocating them the whole screen size. I used the
> > > MyDisplayFullWidth and MyDisplayFullHeight functions there, which works
> > > fine here, but do those work for xinerama setups?
-- 
Olivier Fourdan - fourdan at xfce.org
   
   Interoperability is the keyword, uniformity is a dead end. 
   http://www.xfce.org






More information about the Xfce4-dev mailing list