Re: Aspect ratio SizeHint and fullscreen



On Monday 05 of May 2003 20:13, Billy Biggs wrote:
> Lubos Lunak (l lunak suse cz):
[snip]
> > >
> > >   Should window managers ignore aspect ratio hints if the application
> > > is in a fullscreen state, or should there be a more explicit protocol? 
> > > The problem is that when viewing 16:9 content on a 4:3 screen, you want
> > > the black bars on top and bottom in fullscreen, but in windowed mode,
> > > you want the window manager to only allow resizing which maintains the
> > > aspect ratio.
> >
> > IMHO the aspect hints should be ignored for windows that have
> > _NET_WM_STATE_FULLSCREEN set (they're only hints after all). If the
> > window requests to be fullscreen, it should become fullscreen. If it
> > doesn't cover the whole screen area, then ... well ... it's not
> > fullscreen. I think the player in fact wouldn't even want aspect hints
> > to be used for fullscreen windows. How would it otherwise paint the
> > black area above and below the movie?
>
>   Well definitely a media player wants black bars on top and bottom, but
> is this necessarily the case in general?  I'm trying to rationalize
> Havoc's interest in not fullscreening fullscreen apps, and I was
> thinking it might be reasonable behavior for, say, an xterm?  I'm not
> entirely sure though.

 First of all, the aspect hints are only hints. Nothing requires that the WM 
honors them (or the WM just doesn't have to support them, like one quite 
widely used WM I'm not going to name ;) ). E.g. XTerm has size increment 
hints, but works just fine if I run without a WM and force it to have size of 
the screen.

 In case it would be the app requesting to become fullscreen, that'd be easy - 
the app wants to be fullscreen, it will be fullscreen. The somewhat 
problematic part may be if user changes the state e.g. by right-clicking on 
the titlebar and selecting fullscreen operation. Given that the app is not 
guaranteed the hints will be obeyed, I think the WM could ignore them for 
fullscreen. If the window requests aspect 1:20, should making it fullscreen 
really mean there would be a narrow high window in the middle of the screen? 
Perhaps the WM should not allow making such window fullscreen, but IMHO if 
it's fullscreen, then it should fill the whole screen.

 That said, KWin obeys such hints for maximized windows, instead of fully 
filling the workarea with them. Maybe it should be up to the WM whether it 
will obey the hints for fullscreen windows or not? Your player will reset the 
aspect ratio hints before asking for going to fullscreen, and will have no 
problem with it.

>
>   By the way, does kwin listen to aspect ratio hints?  It doesn't seem
> to here, and that's what I've been testing with.

 The KDE3.1 one doesn't, only the kwin_iii  branch for KDE3.2 does (I stole, 
erm, borrowed that code from Metacity, which borrowed it from ... [long list 
here] >;) ).

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]