Re: community Digest, Vol 156, Issue 27, Ideal screen rotation

2009-11-07 Thread Jared Maddox
 On Fri, 6 Nov 2009 17:22:27 + Rui Miguel Silva Seabra r...@1407.org
 said:

 On Fri, Nov 06, 2009 at 04:40:04PM +0100, Helge Hafting wrote:
  Rui Miguel Silva Seabra wrote:
   On Wed, Nov 04, 2009 at 01:55:29PM +0100, Helge Hafting wrote:
  [...]
   The software that control rotation need to know if the foreground app
   should run in landscape, portrait or auto mode. (And perhaps the
   upside-down variants as well.)
  
   Or, what I think would be the proper way to do it, the application should
   broadcast to dbus that it prefers no rotation, or one of the 4 possible
   rotation states and omnewrotate could listen to such requests and
   not rotate while there is such a message in the bus.
  
  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.

 Of course conflicting signals need to be ignored.

 no. the proper way is to set properties on your window. this is a display
 system thing. dbus is orthogonal to it. you set properties. you let the wm
 figure out what to do with the active window(s) based on their properties.

Which window property, a 'no resize' flag? Is the property stored by
X, the window manager, or something else? Is the code that does the
rotations in the window manager?

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


Re: community Digest, Vol 156, Issue 27, Ideal screen rotation

2009-11-07 Thread The Rasterman
On Sat, 7 Nov 2009 03:41:28 -0600 Jared Maddox absinthdr...@gmail.com said:

  On Fri, 6 Nov 2009 17:22:27 + Rui Miguel Silva Seabra r...@1407.org
  said:
 
  On Fri, Nov 06, 2009 at 04:40:04PM +0100, Helge Hafting wrote:
   Rui Miguel Silva Seabra wrote:
On Wed, Nov 04, 2009 at 01:55:29PM +0100, Helge Hafting wrote:
   [...]
The software that control rotation need to know if the foreground app
should run in landscape, portrait or auto mode. (And perhaps the
upside-down variants as well.)
   
Or, what I think would be the proper way to do it, the application
should broadcast to dbus that it prefers no rotation, or one of the 4
possible rotation states and omnewrotate could listen to such requests
and not rotate while there is such a message in the bus.
   
   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.
 
  Of course conflicting signals need to be ignored.
 
  no. the proper way is to set properties on your window. this is a display
  system thing. dbus is orthogonal to it. you set properties. you let the wm
  figure out what to do with the active window(s) based on their properties.
 
 Which window property, a 'no resize' flag? Is the property stored by
 X, the window manager, or something else? Is the code that does the
 rotations in the window manager?

properties are stored in x - attached to the window in question. wm's listen
for property changes and fetch these properties on window show and property
changes. the wm may do whatever it wants then. the title of your window is a
property. use xprop and click on a window. find out.

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


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