[Orientation] Allow applications to specify the orientations supported

Bug #1379777 reported by Gerry Boland
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Fix Released
High
Vesa Rautiainen
qtmir (Ubuntu)
Fix Released
High
Daniel d'Andrada
unity8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Currently unity8 shell has a partial implementation of orientation support. It trusts applications to rotate their own contents, if they want to. The shell doesn't reposition the panel (at the top) though, so a landscape app still has a portrait panel on the side.

For proper orientation support in the shell, shell needs to know if the application wants to rotate its contents or not. To animate correctly, we really need shell to be responsible for rotating the app surface, not the app itself.

Therefore an application needs to tell shell what orientations it supports, so shell can respect its wishes.

A hint in the desktop file may be sufficient.

---------------------------------------
Desired UX

As described above. Application should be able to tell the system its possible orientations so that the shell can handle the actual rotation accordingly.

Tags: landscape

Related branches

Revision history for this message
Michał Sawicz (saviq) wrote :

> A hint in the desktop file may be sufficient.

Nope, it needs to be a surface property. Apps need to be able to dynamically change their orientation preference.

What's more, as discussed before, some apps will still want to rotate themselves (like camera, probably some games). The panel still needs to change position in that case, and we may say we only support this if app is fullscreen.

All in all, I believe this needs design exploration.

Revision history for this message
Zsombor Egri (zsombi) wrote :

From toolkit point of view, we need an API from QtMir to drive the app orientation, and orientation flags in MainView.

Changed in ubuntu-ui-toolkit:
status: New → Triaged
Revision history for this message
Sylvain Becker (sylvain-becker) wrote :

Hello,

I am the one who talks/asks Gerry about this feature.

My applications/games require a specific orientation : some require Landscape, others Portrait. So they need a way to request/lock this kind of configuration. The file ".desktop" would be really convenient to use (though it may not be dynamic as Michal said).

If you make it an API, please note this is not specific to QtMir. My applications don't use QT at all.
They are directly using MIR Client + OpenGL.

Cheers,

Sylvain

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in ubuntu-ux:
assignee: nobody → Vesa Rautiainen (vesar)
summary: - Allow applications to specify the orientations supported
+ [Dash] Allow applications to specify the orientations supported
Changed in ubuntu-ux:
status: New → Triaged
Revision history for this message
Gerry Boland (gerboland) wrote : Re: [Dash] Allow applications to specify the orientations supported

For iteration 1, the SDK team team agreed that setting the supported orientation in a desktop file hint is sufficient. Should we need more granularity, we can create an API for applications to set it themselves. But the lack of an existing API in Qt's QScreen class means that API would be custom to the UITK.

Awaiting UX decision

Revision history for this message
Gerry Boland (gerboland) wrote :

Just found https://bugs.launchpad.net/mir/+bug/1382209 "[Enhancement] Add an API to lock surface orientation"
so a UX decision would help clarify what we really need

summary: - [Dash] Allow applications to specify the orientations supported
+ Allow applications to specify the orientations supported
Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote : Re: Allow applications to specify the orientations supported

For some of the application, we need to have a fixed orientation at the start-up. For example, a car racing game may expect to have a the landscape orientation instead of the portrait, and it should be fixed instead of being automatically changing the orientation when a phone's orientaton is changed.

Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Triaged
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Changed in ubuntu-ux:
importance: Undecided → High
John Lea (johnlea)
summary: - Allow applications to specify the orientations supported
+ [Orientation] Allow applications to specify the orientations supported
Cris Dywan (kalikiana)
tags: added: landscape
Gerry Boland (gerboland)
Changed in qtmir:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Daniel d'Andrada (dandrader)
Revision history for this message
Albert Astals Cid (aacid) wrote :

unity8 waiting for design -> Incomplete

Changed in unity8 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Laurie Bradshaw (lauriebradshaw) wrote :

Seems mir has the necessary support with mir_surface_set_preferred_orientation, which confusingly doesn't do anything at the moment, as the shell isn't honouring it.

I'm currently providing orientation support in neverball and tuxracer by rotating the whole scene and touch input to the user preference, and locking to an arbitrary orientation using the desktop file parameter to prevent automatic rotation interfering with the gameplay.

It'd be much better if the mir surface flag was honoured so the panel and gesture edges would also be rotated in order to maintain consistency with other applications.

Changed in qtmir:
status: In Progress → Fix Released
Vesa Rautiainen (vesar)
Changed in ubuntu-ux:
status: Triaged → Fix Released
description: updated
Changed in unity8 (Ubuntu):
status: Incomplete → Fix Released
no longer affects: ubuntu-ui-toolkit (Ubuntu)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

@Laurie

This bug is about enabling apps to tell the shell what orientations it supports (through that desktop file parameter). The shell deciding when to rotate them.

What you want is the ability for an application to tell its current preferred orientation (at runtime), which overrides shell's decision on rotating an app (among its supported orientations) based on the device physical position etc.

So this is a different topic and it's being tracked on https://bugs.launchpad.net/mir/+bug/1382209

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Mir added support for it but qtubuntu (for qt based apps), qtmir and unity8 are not using it yet.

Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.