MidScreenRotation

  • Launchpad Entry: mid-screen-rotation

  • Created: 2008-11-21

  • Contributors: Emmet Hikory

  • Packages affected:

Summary

Many MID devices are small enough that they are regularly rotated in users hands. Some are sold with the expectation of being used in portrait mode, and others with the expectation of being used in landscape mode. There should be a simple interface to switch between these modes.

Release Note

Ubuntu MID now provides a simple interface to switch between portrait and landscape display modes, to better enable mobile use cases where an alternate screen geometry is preferred.

Rationale

Many applications, especially those commonly used in Mobile situations, are based around the concept of text flow. It is often more comfortable to read these in portrait mode when they contain lists or emulate pages of a book. Other content, such as web pages with generous pixel width assumptions, or spreadsheets are often better used in landscape mode. Easily switching between these better supports user flexibility to work around the hardware limitations inherent in such a low resolution.

Use Cases

  • Alice is reading a book on her MID. As she is using this as a replacement for carrying mass-market-paperbacks, she prefers to be able to quickly adjust the interface into portrait mode for less horizontal eye movement.
  • Bob is in a meeting and discovers that using a calculator in portrait mode is insufficient to complete the calculation he needs to support the current discussion. He starts a spreadsheet, quickly switches into landscape mode, and is able to enter the data to generate his result.
  • Chris is browsing the web. Some pages look better in portrait mode, and some in landscape mode. By using the screen rotation widget, the interface can quickly be adjusted to provide the best experience for each page.

Assumptions

  • There is sufficient space in the top widget bar for an additional widget
  • X drivers for common MID hardware have sufficient xrandr support to use a common interface.
  • A mode switching framework can easily be attached to hardware inputs (e.g. a hardware rotation button, convertible tablet/laptop mode switch, etc.).

Design

A notification area applet will provide single-click rotation adjustment through xrandr, with a maximially simple UI. No facilities will be provided for operations other than conversion between portrait and landscape. portrait shall be defined as a 90 decree clockwise rotation from landscape.

Implementation

UI Changes

An additional notification area icon will be shown: activating this control will switch between landscape and portrait (clockwise / counterclockwise rotations). No further UI will be exposed.

Code Changes

xrandr functionality shall be accessed through the Python xrandr bindings under development.

Migration

Not data migration or URL redirects are required. The use of this feature in the release notes will be considered sufficient user instruction.

Test/Demo Plan

A test case will be prepared for this interface, and added to the set of tests performed on MID images during milestone image testing.

Unresolved issues

  • How should more complex xrandr use cases for MIDs be handled? Projectors, etc.?
  • How should hardware rotation buttons be handled?
  • What about hardware with preferred counter-clockwise rotation?
  • Use of xrandr features to recover from various resolution issues (e.g. game crash)
  • Special handling for shutdown/reboot, or preserving aspect between sessions.

BoF agenda and discussion

Applications may have their own rotation capabilities - these cases should be disabled, in favor of the system-wide rotation.

  • C APIs for xrandr exist, python bindings are under development.
  • UI should be as simple as possible
  • Possibility to lock screen rotation -- accelerometer should do it or not, if we disable
  • Have option to define rotation direction
  • Examine Hildon for support of re-scaling for panel and hildon-desktop content
  • Make sure kourou can cope with portrait mode -- as can the title bar, etc
  • A testing phase needs to be defined, all applications need to be looked at for scalability between mode switches
  • Apps need to be able to support 480x480 as a minimal requirement
  • Automatic switching back to the used rotation mode after GL games have run (which might not necessarily be able to run in rotated mode) needs to be implemented
  • Cases if a projector is attached (i.e. via an external USB VGA adapter) for presentations need to be handled
  • A testcase needs to be defined to rotate teh screen a certain number of times (i.e. 100 times) to make sure the rotation is stable, no memory leaks start piling up RAM etc. also make sure all application buttons end up in the same location every time you do a rotate event.
  • Examine what happens after shutdown/reboot/suspend/hibernate
    • Shutdown/reboot -- come back as normal
    • Suspend/hibernate -- whatever the user has picked
  • Screensaver locking events need to be translated into xrandr lock events, so locking is disabled while i.e. a movie is played (movie players inhibit the screensaving usually). This might be a phase-2 type of thing. In some cases (presentations) may wish to disable screensaver, but not disable accelerometer.
  • Pressing the applet rotation button will as well force native resolution (the preferred mode), this helps to handle i.e. "hung games" and can in certain cases force the hung app to properly exit.


CategorySpec

Specs/MidScreenRotation (last edited 2009-01-20 06:18:05 by p4081-ipbf2501marunouchi)