On Sat, Nov 07, 2009 at 11:49:18AM +1100, Carsten Haitzler wrote:
> On Fri, 6 Nov 2009 20:24:13 +0000 Neil Jerram <neiljer...@googlemail.com> 
> said:
> > 2009/11/6 Rui Miguel Silva Seabra <r...@1407.org>:
> > > On Fri, Nov 06, 2009 at 04:40:04PM +0100, Helge Hafting wrote:
> > >> Well, you cannot expect every app to have such preferences, this device
> > >> runs generic linux apps that aren't made specially for the freerunner.
> > >> Now, of course the app loader can do this, similiar to how we already
> > >> request the cpu/backlight when launching some apps.
> > >>
> > >> But there is a problem. The user may switch between several apps with
> > >> different rotation needs. (xmahjongg needs landscape, tetris needs
> > >> portrait, ...)  How will omnewrotate be notified about this?
> > >
> > > The proper way is to define a set of DBUS signals.
> > 
> > Thanks to everyone for your replies on this topic.
> > 
> > I agree with Helge, in that I don't think DBUS is a good solution,
> > because I really want a solution that works for existing apps.
> > 
> > I suppose for existing apps there could be a DBUS proxy that somehow
> > works out the best orientation and then sends a DBUS signal on the
> > app's behalf.  But that seems complicated.
> > 
> > Also I'm not sure why DBUS helps at all.  Once a program somewhere has
> > worked out the best orientation, why not just call xrandr directly?
> > 
> > Another thought that occurred to me is that if this was a window
> > manager responsibility, perhaps the window manager could infer
> > preferred orientation simply from the requested window size?  (i.e.
> > requesting width > height implies a preference for landscape).
> > 
> > That should often work for apps that were designed for the desktop.  I
> > would guess that apps written for the FR might not request specific
> > sizes, because they'd know that they will always be fullscreen anyway
> > - so for those apps some explicit configuration would be needed
> > somewhere (prefer-portrait, prefer-landscape, or auto-rotate).
> 
> repeating... "property on window". the rotation preferences are a property of 
> a
> window - like min and max size are, its title, etc. etc. - stick it on the
> window. ignore dbus. this is not something you do by dbus.
> 
> if something is related to the display - especially something is related to
> your window, your domain for advertising state, information, making requests
> and getting replies is the x11 domain as long as you are using x11. :)

I'm definitely not following you... I envision the following scenario according
to what you say, could you please elaborate on why it wouldn't happen this way?

 1. App wants to be landscape, sets property on window
 2. "rotator" determines the phone is in portrait, rotates.

Now what happens?

 3. App is landscape, but screen is portrait: fail

or

 3. Window manager overrides rotation
 3.1 but "rotator" determines portrait, rotates again
 3.2 go to 3: fail

Rui

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to