Ideal screen rotation
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Sun Nov 8 02:17:32 CET 2009
On Sat, 07 Nov 2009 16:56:13 +0100 Matthias Huber
<matthias.huber at wollishausen.de> said:
> 07.11.2009 14:44, Nicola Mfb :
> > On Sat, Nov 7, 2009 at 1:55 PM, Carsten Haitzler <raster at rasterman.com>
> > wrote: [...]
> >> yes. see above. apps are doing it all the time. it's about the most
> >> standard way to provide information about your window, from title to
> >> minimum and maximum size to aspect ratios and more. rotation preferences
> >> are just yet more properties like this. if its a "property" of the window
> >> - put it as a property of the window. use the mechanism created for
> >> precisely this kind of thing. dbus is not that mechanism.
> > [...]
> >> if an app has rotation preferences, it should set them. if it has none - it
> >> gets whatever the screen has right now - or whatever the wm chooses to
> >> implement as policy. yes - you modify apps to have them indicate their
> >> preferences. otherwise they are deemed to "not care" which is the case
> >> now, for example. you modify the apps - thats the right way to do it. you
> >> don't post-mortem find a way to hack things in. :)
> >>> Also do you know if there's already a well-known window property for
> >>> preferred rotation, or would we be inventing a new one?
> >> you'd be inventing it.
> i don't think so, see below
> > I agree that window properties is the right way to implement that, but
> > we need a way to get rotation preferences now, while that may be
> > proposed and discussed as a standard for the future.
> > So a couple of questions:
> > * is it possible/safe/correct to set a window properties of a
> > window/xclient by an external app (e.g. a launcher)?
> in my oppinion, it is not necessary, because one has all needed
> information already in
> --> man XSizeHints
> if a window says, for exampe 800x600, and says maybe in the aspect
> ratios 4:3, the rotation preference is quite clear, i think.
800x600 doesn;'t even fit. its a minimum size. it's not sane to use such a
property as this doesn't tell you the original rotation - just a size. you are
overloading a property here that isn't meant for this information. ther's also
a window aspect ratio property - again, this isn't rotation. a wm may interpret
this by scrolling the window around, not rotating. or just make the window
smaller if it likes it or not (eg what e and matchbox do for example).
> the only thing, i think, we need, is a little patch in the window-manager.
> i don't say it is easy, but this is the only right place.
> > In every case and going a bit ot, is anyway possibile having a generic
> > Window ID to retrieve the .desktop file originating the owning app?
> > I'm just guessing to retrieve the pid from window properties, retrieve
> > the executable (like /proc/pid/exe) and back search in the .desktop
> > file definitions.
> > But this seems weight as the Exec in .desktop files may be a relative
> > path, a link etc, for sure there is a better way, may you explain
> > them?
> these things are workarrounds for not having to patch the window
> manager, i think.
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
More information about the community