Ideal screen rotation

Carsten Haitzler (The Rasterman) raster at rasterman.com
Sun Nov 8 03:54:03 CET 2009


On Sun, 08 Nov 2009 02:03:47 +0000 Dave Ball <openmoko at underhand.org> said:

> Carsten Haitzler (The Rasterman) wrote:
> > On Sat, 7 Nov 2009 19:46:28 +0000 Rui Miguel Silva Seabra <rms at 1407.org>
> > said: 
> >> Being X properties or DBUS, it's the same for me. DBUS seems more natural
> >> as there's probably less pooling, but then I know only a bit more of DBUS
> >> than of X11 (which AFAIR was a bunch of huge books) :)
> >>     
> >
> > no. dbus is far from natural or correct. that's what i keep saying. this is
> > not something for dbus. it's something for properties on a window.
> >   
> 
> Sounds like we should be using window properties for passing hints to 
> the WM, and dbus for getting orientation information from the 
> accelerometers.

that is sane. :)

> Maybe it's time for omnewrotate to retire, with the WM talking to FSO's 
> orientation API [1] directly?

perhaps. whatever the mechanism

1. the wm is the right place to make the decision.
2. the wm is in the best position to easily gather information about an
application's window and know what window is active
3. the wm is already talking to the xserver as part of its job - and it's
always hanging around
4. all the wm needs to know is "some external input has decded that the screne
should be rotated". be this an accelerometer, or like the g1, opening up the
screen, so be it. as long as
4.1 the current status of this rotation state can be queried at any time (you
can ask what position the device is in or the screen is opened up or not etc.
etc.)
4.2 you can get an event when this state changes really quickly (not have to
wait a while).

if it were me... i'd even have the current desired rotation state be a property
on the root window too... but at this point its moot - dbus or property. it's
the same. from my view - the property is simpler to do. it takes significantly
less code in most languages/toolkits. trust me on this one. it does. but.. as i
said - at this point it's moot. individal apps preferences for rotation should
be properties on their own windows.

> app -> window properties -> wm -> dbus -> fso
> 
> WM making the decision on what direction to orient the display, based on 
> window properties and device actual orientation etc.

yes. :)

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




More information about the community mailing list