Om2009 testing release 4
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Mon Jun 1 11:24:22 CEST 2009
On Mon, 1 Jun 2009 09:10:41 +0100 Rui Miguel Silva Seabra <rms at 1407.org> said:
> On Mon, Jun 01, 2009 at 05:21:15PM +1000, Carsten Haitzler wrote:
> > On Mon, 25 May 2009 17:20:08 +0100 Rui Miguel Silva Seabra <rms at 1407.org>
> > said:
> > > I'm sure it's not, AFAICT (since I don't know Parloi's internals) it
> > > doesn't touch anything Paroli or anything related to calls.
> > >
> > > As for your problem with landscape vs portrait positions and GUIs... well,
> > > that's a problem that's not easy to solve unless all applications pay
> > > attention to a specific dbus signal which omnewrotate will send in the
> > > future.
> > >
> > > This signal can be used by apps so they adjust their UI according to the
> > > display mode, but other than that, they all think they're in the same
> > > position.
> > no dbus signals needed. when x rotates,you'll get a configurenotify on root
> > AND an XRRScreenChangeNotifyEvent event (on root). These will also tell you
> > your orientation and new size. The WM, if smart, will resize your app
> > window anyway, so all you really need to do is, on resize, query x for the
> > orientation, if orientation matters. if it doesn't just adjusting to the
> > new size is what you should be doing anyway.
> Ah... so applicaitons like, say, paroli, mokomaze, etc... need to pay
> attention to XRRScreenChangeNotifyEvent ?
well they dont HAVE to - they simply should adjust to a new size (640x480 as
opposed to 480x640). that is already done for them (if under a window manager
that is sensible). they will get resized. if you want to do something SPECIAL
when in a particular rotation other than just adjust to the new size (i
generally would advise this as a bad idea - in he case of the freerunner, i see
no good reason to do anything special as there are no particular
markings/buttons around the screen you may want to specially have your ui
adjust to their new location relative to the pixels on the screen).
as paroli is in python - there isn't much it can do. the python bindings, as
best i know, don't export the Ecore_X_Event_Screen_Change,
Ecore_X_Event_Randr_Crtc_Change, Ecore_X_Event_Randr_Output_Change and
Ecore_X_Event_Randr_Output_Property_Notify events (these are more than you need
though - you only need the first, the other 3 are for xrandr1.3+ where you can
get events based on new outputs being added/removed (eg plug in an external
monitor to a laptop). also other function calls to query:
ecore_x_randr_screen_rotations_get(), ecore_x_randr_screen_rotation_get() etc.
so again - the only reasons i could think of for ACTUALLY wanting to know
rotation (other than adjust to screen size change) are:
1. external input like camera image needs rotating (as the camera just rotated
and the screen pixels did so you need to rotate the camera image back, but no
camera on freerunner)
2. you have some special markers/buttons around the screen that you have
buttons/indicators referring to these. (not on freerunner)
other than that window resize events are all you need (and if you need a new
custom layout - then choose it based on window size, not on rotation, as now
you also work in devices with landscape displays - eg n800).
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
More information about the community