MainView is missing an API to dynamically set supported orientations

Bug #1413121 reported by Michael Zanetti
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
qtmir (Ubuntu)
Confirmed
Medium
Unassigned
qtubuntu (Ubuntu)
Confirmed
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

The MainView offered an api to lock the app to portrait. When shellRotation landed, that was replaced by entries in the .desktop file (X-Ubuntu-Supported-Orientations).

However, still this isn't really enough for some use cases. For example an app might want to be locked to portrait while showing the main menu, but when displaying certain content enable allowing rotation.

For that, there would be the need of an API, similar to the .desktop entries, but changeable at runtime.

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

Mir does provide an api for client to specify this to shell. But nothing is using it yet

Changed in qtmir:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Stuart Langridge (sil) wrote :

Also, I always lock my phone's rotation so that it's always portrait only. A "lock to landscape" API for a game should override this, for that game only.

Revision history for this message
Tim Peeters (tpeeters) wrote :

I thought that all the orientation handling was going to be removed from MainView, and dealt with by unity8 somehow?

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

What Gerry is talking about - afaik - is the one apps should specify in the desktop file, which is about to land in Vivid. However, the feature Michael is talking about is more runtime one, for which we do not have API yet to connect to.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in qtubuntu (Ubuntu):
status: New → Confirmed
Cris Dywan (kalikiana)
tags: added: landscape
Revision history for this message
Cris Dywan (kalikiana) wrote :

This has been implemented at this point in the form of
X-Ubuntu-Supported-Orientations=landscape

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Reopening, this really needs to be changeable during runtime. The current entry in the .desktop file is not enough.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Invalid → New
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

I'm confused. Is this bug about:

1) making it possible for an application to tell the orientations it supports.

or

2) making it possible for an application to tell the orientation it would like to be put in (from the set of supported orientations, which is constant) at runtime.

1 has been solved by the X-Ubuntu-Supported-Orientations desktop file entry. Only 2 seems to be missing.

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

eg: an application may be freely rotated "X-Ubuntu-Supported-Orientations=portrait,landscape" but while it's displaying a fullscreen video, for instance, it will want to be put specifically in landscape.

The game example in the bug description is solved by adding "X-Ubuntu-Supported-Orientations=landscape" to its desktop file, as kalikiana said.

So if this bug is about item 2 from comment #9, its description should be rewritten.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

An application might want to be locked to portrait while showing the main menu, but allow rotating while displaying some certain content. For that, the entries in the .desktop file are too static and there needs to be an API that can change those attributes at runtime.

summary: - MainView is missing an API to lock to landscape
+ MainView is missing an API to dynamically set supported orientations
description: updated
Revision history for this message
Zsombor Egri (zsombi) wrote :

We need Mir support for this, and an API we can drive this.

Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Gerry Boland (gerboland)
tags: added: unity8
Michał Sawicz (saviq)
no longer affects: qtubuntu
Michał Sawicz (saviq)
Changed in qtmir (Ubuntu):
importance: Undecided → Medium
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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