[Sugar-devel] prevent screen rotation in a sugar activity?

Bakhtiar Mikhak mikhak at mediamods.com
Mon Dec 20 13:40:48 EST 2010


On Dec 13, 2010, at 6:03 PM, James Cameron wrote:

> On Mon, Dec 13, 2010 at 01:12:04PM -0500, Bakhtiar Mikhak wrote:
>> On Dec 10, 2010, at 6:09 PM, James Cameron wrote:
>> 
>>> On Fri, Dec 10, 2010 at 05:50:54PM -0500, Bakhtiar Mikhak wrote:
>>>> If I am reading the current version of HIG correctly, it is not a
>>>> requirement for developers to implement a portrait layout for their
>>>> activity:
>>>> 
>>>>  Screen Rotation
>>>> 
>>>>  While in Hand-held mode, the laptops support screen rotation; by
>>>>  pressing a small button on the bezel of the display, the interface
>>>>  will rotate 90 degrees to provide a portrait layout of the
>>>>  currently active activity. Just as any activity can implement
>>>>  Hand-held mode, those which can benefit from a vertical aspect
>>>>  ratio may also implement this feature, and we encourage developers
>>>>  to take advantage of this functionality.
>>> 
>>> Agreed, it is not a requirement for the activity to implement portrait
>>> layout.  When it is not implemented, part of the activity would be
>>> invisible after rotation.  The learner will rapidly find the activity
>>> does not work well when rotated, and will avoid rotating.
>> 
>> I was not suggesting to support a UI rotation without accounting for
>> the change in the dimensions!
> 
> I wasn't suggesting that either.  I mentioned it in order to be
> comprehensive.  I've seen several activities or applications react in
> this way to rotation.

Thank you. I appreciate your point. My point was more basic: if one has the option to disable rotations for one's activity, one can ensure that the users of one's activity don't encounter a compromised rotated layout. :-) 

>> Setting aside the wisdom of iPhone and Android allowing developers
>> control over UI rotation, there are however practical considerations
>> on XOs that lead us to want to disable UI rotation. For example, as
>> one can easily verify in Record and other activities which use
>> Gstreamer, xvimagesink does not rotate its contents.
> 
> Ah, so you're saying the reason you do not wish to support rotation in
> your activity is that xvimagesink does not support rotation.  You are in
> the same situation as the Record activity then.  I was not aware of
> that.

Yes, whether or not we want to support rotation, we can't on XOs because of the documented bug with xvimagesink and UI rotation.

>> Your comments did also make us wonder if the case that you seem to be
>> concerned with can be seen anywhere on the laptop right now. And, we
>> discovered the bug that you can see in [ http://imgur.com/z8s4i ] on
>> the latest Sugar build on an XO-1.5. Note that the speaker icon gets
>> positioned incorrectly after a UI rotation as well. 
> 
> That's not the latest Sugar build, and that's not an XO-1.5.  It is an
> XO-1, with OpenFirmware Q2E45, running OLPC OS os357.  It's nearly the
> latest OLPC OS build; os358 follows.  These are development builds
> leading toward 10.1.3 release.

I should have provided links to pictures from XO 1.0 and 1.5 machines; the bug effected both machines.

>> We have just filed tickets for these bugs.
> 
> Where?  I've just checked on http://bugs.sugarlabs.org/ and
> http://dev.laptop.org/ and couldn't find them.

The bugs were filed but apparently were still awaiting approval when I wrote my last message. They have both since been approved, closed, and noted as bugs that should be submitted to OLPC instead.

>>>> I therefore think it is worth considering if the control over if/how
>>>> one's activity takes advantage of screen rotation should be exposed
>>>> through the Sugar API.
>>> 
>>> Sounds good, please propose a design and patch.
>> 
>> There are many people on this list who are more deeply familiar with
>> the Sugar source code and would know best know how to go about doing
>> this, but I am happy to work on it, and it would definitely be a good
>> constructionist learning experience. In the meantime, however, as
>> activity developers with limited time and resources, we were initially
>> asking if this functionality is already supported and exposed through
>> the API.  
>> 
>> The larger point being, sometimes Activity developers would not mind
>> foregoing an opportunity to extend the platform they build on in
>> exchange for access to tools that help them be more expressive and
>> productive with that platform. Inviting our developers to extend the
>> system when they ask whether a feature is supported in the API,
>> however well intentioned and welcoming it is meant to be, can serve as
>> a deterrent. I am sure that is not what we want.
> 
> Yes, it would be a deterrent to many.  The last thing Sugar needs is
> changes that break things.  Having been responsible for one recently,
> I'm being very cautious now.  I'm not sure that it has helped, my
> patches still don't get in.  I really doubt that I alone could achieve
> the API you desire.
> 
> By the way, a request for an API for an activity to prevent rotate
> was logged in 2007 in ticket #2791.  http://dev.laptop.org/ticket/2791
> 
> See also
> 
> http://dev.laptop.org/ticket/6477 (record-activity suddenly breaks if
> screen is rotated)
> 
> http://dev.laptop.org/ticket/5797 (Record doesn't display image if the
> screen is rotated)
> 
> http://dev.laptop.org/ticket/4112 (Need option to rotate recorded
> video.)
> 

Thank you for these links, Cameron. I appreciate you taking the time to consider and offer feedback on our questions. 

> -- 
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel




More information about the Devel mailing list