Ideal screen rotation

Carsten Haitzler (The Rasterman) raster at rasterman.com
Sun Nov 8 02:19:45 CET 2009


On Sat, 7 Nov 2009 17:31:58 +0100 Nicola Mfb <nicola.mfb at gmail.com> said:

> On Sat, Nov 7, 2009 at 4:56 PM, Matthias Huber
> <matthias.huber at wollishausen.de> wrote:
> [...]
> > * 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.
> 
> Good point! it may be if preferred width>prefferred height then use
> landscape else use portrait.
> How may we handle the case for apps that are able to auto relayout
> according to screen orientation?
> An idea may be if ratio is in a 1 +/- x than use autorotate else use
> the previous pseudo snippet.

correct. these apps will have minimu8m window sizes too - often set by the
toolkit. the information here is now bogus and unintended and doesn't want to
tell you to keep an orientation specifically. this hint is not intended for
this. creasting a new atom for a hint and setting it is very easy. you are not
materially saving work by overloading existing properties which as you already
can see - will cause problems.

> We should gather if generic apps uses xsizehints at all in the proper
> way, I guess yes.
> 
> > 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.
> 
> Agree, and this should be more feasible than other heavy implementation.
> 
> > 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.
> 
> Exactly! I'm writing a small apps that interact with the window
> manager via ewmh and it works well (tested on matchbox), i'm able to
> raise, activate, close windows, manage the stacking list and so on, so
> the idea is to add randr code to rotate them, in that way should work
> with every wm ewmh compliant.
> 
> I'm searching for a way to retrieve the .desktop entry of a Window ID
> to have a nice app switcher with localized names, nice graphics and so
> on, and it seems that the wm class may help me in that, finally we may
> use XSizeHint + .destkop custom overrides when necessary?
> 
> Oh.... last time I checked Illume about that I found it's not ewmh
> compliant, just curious if it is now implemented?
> 
> Regards
> 
>       Nicola
> 
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com




More information about the community mailing list