Kimmo, thanks for the clarification! I´ll update the wiki article 
accordingly!

Thanks!
Conny


Kimmo Hämäläinen wrote:
> On Fri, 2009-08-21 at 15:53 +0200, ext Alberto Garcia wrote:
>> On Fri, Aug 21, 2009 at 02:53:01PM +0200, Cornelius Hald wrote:
>>
>> I'll try to summarize how it works (I'm adding Kimmo to Cc in case I'm
>> forgetting something, as the rotating itself is done by the desktop,
>> libhildon only sets a WM hint).
>>
>> Let's suppose we open a new window. Before we open that window the
>> device might already be in portrait mode.
>>
>> If the portrait flags of the new window are:
>>
>> 1) No flags -> The screen is rotated to landscape mode.
> 
> Correct.  An example: when you are in portrait mode and suddenly a
> system-modal dialog pops up without the SUPPORT or REQUEST flag, we go
> to the landscape mode.
> 
>> 2) _SUPPORT -> The screen keeps its orientation.
> 
> Correct ...unless some window has the REQUEST flag. The SUPPORT flag on
> your window tells that you support the portrait mode, i.e. your window
> can relayout itself for the portrait mode. The REQUEST flag on your
> window tells that you want to be in the portrait mode (for whatever
> reason, not necessarily just because the device is currently in portrait
> orientation!).  Hildon-desktop is not turning the screen to portrait
> unless there is at least one visible window with REQUEST and the rest of
> the visible windows have the SUPPORT (explicit or implicit) flag. These
> flags are inherited to transient windows, and REQUEST implies the
> SUPPORT flag.
> 
>> 3) _SUPPORT + _REQUEST -> The screen is rotated to portrait mode
>> 4) _REQUEST alone -> I don't think we're using that. Kimmo?
> 
> REQUEST is the same as REQUEST + SUPPORT. Since there is no sense to
> request the portrait mode if you don't support it...
> 
>> To detect whether a device is physically rotated I think you need to
>> use the DBus API already mentioned in this thread.
> 
> Correct, the sig_device_orientation_ind signal from MCE.
> 
>> In other words: using this API alone won't change the orientation of
>> the screen when the device is physically rotated, am I right Kimmo?
> 
> Hildon-desktop looks at these flags, it does not listen to the
> orientation signals, so it does not know how the device is oriented
> relative to the Earth's crust.  (There is an exception to this, but you
> are not affected by it.)
> 
> -Kimmo
> 
>> Berto
> 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to