Implement Screen::GetShellMode()

Bug #1610929 reported by Chris Coulson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Incomplete
Undecided
Unassigned
Oxide
Fix Released
High
Santosh
mir (Ubuntu)
Incomplete
Undecided
Unassigned
unity8 (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is currently just a stub that returns NonWindowed on mobile devices and Windowed everywhere else. It needs to be more intelligent than that (eg, Windowed on a tablet device) and needs to be dynamic, but I don't think there's a way for us to do that yet.

Basically, we need to know whether the shell is in windowed or staged mode. The display's form factor isn't particularly relevant.

This is needed to complete bug 1545088 and others.

Related branches

Changed in oxide:
importance: Undecided → High
status: New → Triaged
description: updated
Revision history for this message
David Barth (dbarth) wrote :

Can mir and / or unity8 give us that information?

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

You can already do this by querying Unity 8 GSettings (qml snippet below):

import GSettings 1.0

GSettings {
   id: settings
   schema.id: "com.canonical.Unity8"
}

...

if (unity8Settings.usageMode === "Windowed") {
   // running in windowed mode
} else { // == "Staged"
   // running in staged mode
}

Revision history for this message
Santosh (santoshbit2007) wrote :

I have a small doubt, Does Gettings automatically dynamically track connection of mouse and keyboard to tell about window mode OR its just the track the static(and user changable) setting menu in unity8.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

And confined applications can't access that anyway.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

GSettings doesn't track it itself but unity8 writes the correct value on mode change.

Confinement is a problem, yeah :/

Changed in oxide:
status: Triaged → Fix Released
milestone: none → branch-1.20
assignee: nobody → Santosh (santoshbit2007)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mir has no knowledge of stages. That is a concept which exists at the higher level in Unity8. However Mir's form factor enumeration would probably need a new entry still. And an API for Unity8 to set it.

Before we go wedging something called "staged" into Mir though, please try to consider a generalised approach that is a superset of the Unity8 design. Since Mir should support other shells. What we call "staged" might be called "tiled" in Mir for example.

So we need a design, but before that we need to be more confident that any change in Mir is really required at all.

Changed in mir:
status: New → Incomplete
Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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