[enhancement] Implement support for window states based on form factor

Bug #1535397 reported by Michał Sawicz on 2016-01-18
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Pocket Desktop
High
Michał Sawicz
Canonical System Image
High
Michał Sawicz
Mir
Fix Released
High
Alan Griffiths
The Avila project
High
Michał Sawicz
camera-app (Ubuntu)
High
Florian Boucault
gallery-app (Ubuntu)
High
Arthur Mello
mediaplayer-app (Ubuntu)
High
Renato Araujo Oliveira Filho
mir (Ubuntu)
Undecided
Unassigned
qtmir (Ubuntu)
High
Nick Dedekind
qtubuntu (Ubuntu)
High
Nick Dedekind
unity8 (Ubuntu)
High
Nick Dedekind

Bug Description

We need to support windows in Staged mode to go fullscreen, whereas in windowed, it should be a normal window.

Related branches

Michał Sawicz (saviq) on 2016-01-18
Changed in qtubuntu (Ubuntu):
assignee: nobody → Lukáš Tinkl (lukas-kde)
importance: Undecided → High
status: New → Triaged
Changed in canonical-devices-system-image:
milestone: none → ww04-2016
status: New → Triaged
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
Michał Sawicz (saviq) on 2016-01-18
Changed in avila:
assignee: nobody → Michał Sawicz (saviq)
Lukáš Tinkl (lukas-kde) wrote :

What we roughly need in Mir is to extend MirSurfaceState enum with a value of e.g. "mir_surface_state_automatic" which will be then later resolved by Unity8 to either fullscreen or to windowed based on the current u8 stage (phone vs. desktop)

Alan Griffiths (alan-griffiths) wrote :

There's slightly more involved than adding mir_surface_state_automatic as the surface state will change to maximized/restored etc. but there needs to be a persistent "automatic" attribute as well.

Michał Sawicz (saviq) wrote :

Could we have a separate, read-only requestedState property?

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in mir:
importance: Undecided → High
Changed in mir:
milestone: none → 0.19.0
Alan Griffiths (alan-griffiths) wrote :

Adding qtmir as that needs to handle the Window Management metadata Saviq alludes to.

Changed in qtmir:
importance: Undecided → High
summary: - Implement support for QWindow::visibility set to Automatic
+ [enhancement] Implement support for QWindow::visibility set to Automatic
tags: added: enhancement

Having discussed this a few times I've reached the following conclusion:

"automatic" is not a MirSurfaceState - if it were a MirSurfaceState, then it would be correct to return it from get_state() and for it to be implemented as "looking the same as fullscreen or restored".

By comparison, "restored" can look like "maximized" on the phone or as windows on desktop and is what get_state() returns.

Instead it is additional metadata about the surface requesting a specific treatment of the MirSurfaceState.

So, I think the right approach for Mir is to have an additional surface attribute:

enum MirSurfaceStatePolicy
{
    mir_surface_state_policy_default,
    mir_surface_state_policy_qt_automatic,
    ...
};

With corresponding setter and getter functions on the MirSurfaceSpec*

Chris Halse Rogers (raof) wrote :

I remain unconvinced that this needs anything to be implemented in Mir at all.

This appears to be a Qt-specific API that can be implemented entirely in the client-side QPA - the QPA needs to know whether the client wants automatic state anyway, knows the form-factor the surface is on, receives events when form-factor changes, and can set the appropriate state.

Since this is a Qt-specific API it seems reasonable for the Qt-specific code to implement it.

What this doesn't allow is for the shell to determine what “default” means, but given the API is just “something selects between fullscreen and windowed” it doesn't really allow the shell much lattitude anyway.

I disagree with calling this a "Qt-specific API", since this is rather
Ubuntu-specific behaviour, oblivious of the toolkit. Qt might be the
default toolkit we're using, but clients using other toolkits (or none
at all) should be able to make use of this behaviour as well.

I can rename the bug to "[...] support for shell-determined surface
state [...]" or so, it will then become toolkit agnostic :).

Changed in qtmir:
assignee: nobody → Lukáš Tinkl (lukas-kde)
status: New → In Progress
Changed in unity8 (Ubuntu):
status: Triaged → In Progress

To clarify, the desired behaviour /can/ be implemented client-side with the existing Mir API. This would require implementation code in each toolkit (or client). The limitation of this approach being that the shell isn't required to respect set_state() requests issued by the client.

We /can/ also implement the same client-side logic in Mir which would need a new API. This would make it independent of toolkit (but the toolkits would need to invoke the new API).

We can also implement the logic on the server side which would also need a new API. It would also allow the shell to make a better decisions about how to respect the client request.

The best trade-off between these implementations isn't clear to me. (Yet!)

What to call the requested "fullscreen or restored" behaviour is unclear to me, but "automatic" seems both misleading and unclear.

Chris Halse Rogers (raof) wrote :

As an addendum to Alan's comment: we *have* shell-determined surface state; all surface state requests can be arbitrarily modified by the shell.

The use-case being asked for is a “support for surface state that is fullscreen on the phone but windowed on the desktop”; which is available to clients right now via the same mechanism that the QPA would use.

As a note to Chris's comment #9:

While what is being asked for is state associated with a surface, it isn't a distinct "surface state".

If modelled as surface state it requires at least new two states mir_surface_state_automatic_restored and mir_surface_state_automatic_fullscreen (and possibly mir_surface_state_automatic_unknown).

My concerns are threefold:

1. there is no good name for this feature: "automatic" doesn't capture specific behaviour;
2. I don't understand why this specific use case needs any special support; and,
3. what advantage is expected from Mir being involved?

As discussed above:

Clients can implement this behaviour right now.

Toolkits can implement this behaviour right now.

Involving Mir would be to give the Window Management Policy another customization point should it choose not to allow the state request made by the client. But why is that useful?

PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.20.0

Changed in mir:
status: New → Fix Committed
Michał Sawicz (saviq) on 2016-01-25
Changed in canonical-devices-system-image:
status: Triaged → In Progress
Changed in unity8 (Ubuntu):
assignee: Lukáš Tinkl (lukas-kde) → Nick Dedekind (nick-dedekind)
Changed in qtubuntu (Ubuntu):
assignee: Lukáš Tinkl (lukas-kde) → Nick Dedekind (nick-dedekind)
status: Triaged → In Progress
Bill Filler (bfiller) on 2016-01-28
Changed in camera-app (Ubuntu):
assignee: nobody → Florian Boucault (fboucault)
importance: Undecided → High
status: New → In Progress
Changed in gallery-app (Ubuntu):
assignee: nobody → Arthur Mello (artmello)
importance: Undecided → High
status: New → In Progress
Changed in mediaplayer-app (Ubuntu):
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
importance: Undecided → High
status: New → In Progress
Daniel van Vugt (vanvugt) wrote :

mir (0.19.0+16.04.20160128-0ubuntu1) xenial; urgency=medium

Changed in mir:
status: Fix Committed → Fix Released
Changed in mir (Ubuntu):
status: New → Fix Released
tags: added: lt-blocker
Michał Sawicz (saviq) on 2016-02-02
Changed in qtmir:
assignee: Lukáš Tinkl (lukas-kde) → Nick Dedekind (nick-dedekind)
Michał Sawicz (saviq) on 2016-02-05
summary: - [enhancement] Implement support for QWindow::visibility set to Automatic
+ [enhancement] Implement support for window states based on form factor
description: updated
Changed in canonical-pocket-desktop:
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
status: New → In Progress
Changed in avila:
importance: Undecided → High
milestone: none → ww06-2016
status: New → In Progress
Changed in canonical-devices-system-image:
milestone: ww04-2016 → ww08-2016
Michał Sawicz (saviq) on 2016-03-01
Changed in qtmir (Ubuntu):
assignee: nobody → Nick Dedekind (nick-dedekind)
importance: Undecided → High
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gallery-app - 0.0.67+16.04.20160323.1-0ubuntu1

---------------
gallery-app (0.0.67+16.04.20160323.1-0ubuntu1) xenial; urgency=medium

  [ Arthur Mello ]
  * Enable sharing multiple files Notify user when trying to share
    photos and videos at the same time (LP: #1523573)
  * Set Window flag instead of Window state to toggle fullscreen mode
    for media viewer (LP: #1535397)

  [ CI Train Bot ]
  * Resync trunk. added: po/sk.po

 -- Arthur Mello <email address hidden> Wed, 23 Mar 2016 18:03:08 +0000

Changed in gallery-app (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu - 0.62+16.04.20160322-0ubuntu1

---------------
qtubuntu (0.62+16.04.20160322-0ubuntu1) xenial; urgency=medium

  [ Lukáš Tinkl ]
  * Support for switching kbd layouts (LP: #1524400, #1491340)

  [ Nick Dedekind ]
  * Added support for low shell chrome (LP: #1535397)

 -- Michael Zanetti <email address hidden> Tue, 22 Mar 2016 08:49:45 +0000

Changed in qtubuntu (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.8+16.04.20160322.1-0ubuntu1

---------------
qtmir (0.4.8+16.04.20160322.1-0ubuntu1) xenial; urgency=medium

  [ Nick Dedekind ]
  * Added Application::setStage

  [ Lukáš Tinkl, Michał Sawicz ]
  * Support for switching keyboard layouts (LP: #1524400, #1491340)

  [ Lukáš Tinkl, Michał Sawicz, Nick Dedekind ]
  * Add support for low shell chrome. (LP: #1535397)

 -- Michael Zanetti <email address hidden> Tue, 22 Mar 2016 16:18:06 +0000

Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.12+16.04.20160323.2-0ubuntu1

---------------
unity8 (8.12+16.04.20160323.2-0ubuntu1) xenial; urgency=medium

  [ Michael Terry ]
  *
  * Fix setting OSK layout in OOBE wizard
  * Stop the left edge tutorial from being shown when the bottom edge
    tutorial wants to be shown after receiving a call.

  [ Albert Astals Cid ]
  * Filter implementation with Option Selector filter as the only filter
  * Get the engine from the parent context
  * Implement the API changes due to filters
  * Match design visuals for the new dash navigation/page header popup
  * New Dash Navigation UX
  * Range Input filter
  * Value slider filter
  * Workaround SDK ListItem bug

  [ Albert Astals Cid, Lukáš Tinkl ]
  * Fix various tests

  [ CI Train Bot ]
  * Resync trunk.
  * Update translation template

  [ Lukáš Tinkl, Michael Terry ]
  * New first-run wizard for the phone (part of the OOBE effort) (LP:
    #1536688, #1536617, #1543790, #1555222)

  [ Lukáš Tinkl, Michał Sawicz ]
  * Keymap switching support (LP: #1524400, #1412492, #1491340)

  [ Michael Terry, Michael Zanetti ]
  * Redesign the first-boot edge tutorial

  [ Michael Zanetti ]
  * disabling some tests that are flaky in adt but can't be made fail on
    our machines

  [ Michael Zanetti, Michał Sawicz ]
  * Change the behavior alond with the switch in indicator-display (LP:
    #1538591)

  [ Michael Zanetti, Michał Sawicz, Nick Dedekind ]
  * Add support for low shell chrome. (LP: #1535397)
  * Sidestage load/unload redesign (LP: #1544479)

 -- Michael Zanetti <email address hidden> Wed, 23 Mar 2016 09:53:17 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mediaplayer-app - 0.20.5+16.04.20160323-0ubuntu1

---------------
mediaplayer-app (0.20.5+16.04.20160323-0ubuntu1) xenial; urgency=medium

  [ Arthur Mello ]
  * Do not let the progress bar jump back after a seek command (LP:
    #1470332)

  [ CI Train Bot ]
  * Resync trunk.

  [ Renato Araujo Oliveira Filho ]
  * Set window flag to: 0x00800000 (LP: #1535397)

 -- Bill Filler <email address hidden> Wed, 23 Mar 2016 13:39:23 +0000

Changed in mediaplayer-app (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-pocket-desktop:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in qtmir:
status: In Progress → Fix Released
Changed in camera-app (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq) on 2017-03-13
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers