Desktop applications don't get properly resized when launched in staged mode

Bug #1670390 reported by Daniel d'Andrada
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
In Progress
High
Michał Sawicz
gtk+3.0 (Ubuntu)
Fix Released
High
William Hua
qtmir (Ubuntu)
Fix Released
High
Daniel d'Andrada
qtubuntu (Ubuntu)
Invalid
High
Unassigned
unity8 (Ubuntu)
Fix Released
High
Daniel d'Andrada

Bug Description

Steps to reproduce the issue:

1 - Put unity8 in staged mode
2 - Launch a desktop application like kate or qtcreator

Expected outcome:
The launched application takes up the entire stage area

Actual outcome:
The launched application starts with some windowed size it wanted to have, not filling the entire stage area. As if launched in desktop mode.

Comments:
Leaving staged mode and going back into it again gets the application to resize correctly and fill the entire stage area.

Going from desktop to staged mode while the desktop application is already running also works fine.

Related branches

description: updated
description: updated
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This sounds like bug 1655804. It may require the same kind of fix: The toolkit needs to register its Mir event callback in the spec prior to window creation to support Unity8 behaviour.

tags: added: unity8-desktop
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
milestone: none → u8c-1
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
Changed in qtubuntu (Ubuntu):
importance: Undecided → High
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

With gtk+ apps, when they get launched the ask for a resize. If in tablet/phone mode unity8 will deny/ignore it, but gtk thinks the resize was successful and renders as if its window had the size it requested (that's with the qtmir and unity8 branches attached to this bug)

kevin gunn (kgunn72)
tags: added: gtk-mir
Changed in gtk+3.0 (Ubuntu):
assignee: nobody → William Hua (attente)
importance: Undecided → High
Changed in qtmir (Ubuntu):
status: New → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
Changed in qtmir:
status: New → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
importance: Undecided → High
Changed in qtmir (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
importance: Undecided → High
tags: added: visual-quality
Changed in gtk+3.0 (Ubuntu):
status: New → Invalid
Changed in canonical-devices-system-image:
status: New → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

@vanvugt

Could you please explain why you invalidated the gtk+3.0 bug?

Changed in qtubuntu (Ubuntu):
status: New → Invalid
Changed in gtk+3.0 (Ubuntu):
status: Invalid → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

(trying to remember)

Because I assumed there is never any boolean feedback on a resize operation and so GTK would be correct in assuming resize must always succeed.

However I now realize the correct feedback method is in the form of resize events (which, sheepishly, I authored), so yeah GTK can check if the resize succeeded.

You're right GTK should be open here too. Even if a tiling/stage WM fails to honour the requested size, the toolkit should be listening for resize events and respond to the fact that it is now tiled.

Revision history for this message
William Hua (attente) wrote :

Based on my logs, GTK isn't receiving any resize events when the window appears. Is the expectation that Mir should be sending this? Or should GTK explicitly request the size on appearance?

For reference (annotated):

 90 EVENT 10 mir_event_type_window_output
 91 WINDOW
 92 Attribute focus
 93 Value 1
 94 EVENT 11 mir_event_type_input_device_state
 95
 96 (gtk3-demo:17882): Gdk-WARNING **: Ignoring unknown Mir event 11
 97 EVENT 8 mir_event_type_keymap
 98
 99 (gtk3-demo:17882): Gdk-WARNING **: Ignoring unknown Mir event 8
100 WINDOW
101 Attribute visibility
102 Value 1
103 WINDOW
104 Attribute focus
105 Value 0

William Hua (attente)
Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Michał Sawicz (saviq)
no longer affects: qtmir
Revision history for this message
William Hua (attente) wrote :

This should be fixed under U8 with the gtk just released in zesty.

Under miral-shell, there's a small regression which is fixed in the PPA:

https://launchpad.net/~attente/+archive/ubuntu/gtk-mir

William Hua (attente)
Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.5.1+17.04.20170320.1-0ubuntu1

---------------
qtmir (0.5.1+17.04.20170320.1-0ubuntu1) zesty; urgency=medium

  [ Alan Griffiths ]
  * Reduce dependencies on mirserver by reworking
    ../Application/mirbuffersgtexture.cpp and
    ../Application/surfacemanager.cpp

  [ Andreas Pokorny ]
  * Attach MirInputDeviceId and the MirCookie to input events (LP:
    #1536279, #1668692)

  [ Daniel d'Andrada ]
  * Implement MirSurface::allowClientResize (LP: #1670390)

  [ Gerry Boland ]
  * Stop MirSurface deleting itself, ensure SurfaceManager alone manages
    MirSurface lifetimes. Add SurfaceManager test suite. (LP: #1655644)
  * Extend timeouts when running under valgrind

  [ Albert Astals Cid, Gerry Boland ]
  * Check for find() result not being null before using it

 -- Michał Sawicz <email address hidden> Mon, 20 Mar 2017 21:16:34 +0000

Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.15+17.04.20170321-0ubuntu1

---------------
unity8 (8.15+17.04.20170321-0ubuntu1) zesty; urgency=medium

  [ Albert Astals Cid ]
  * Signal aboutToShow (LP: #1664578)
  * Support Panel top level items to be disabled (LP: #1670694)
  * Improve Launcher ←→ touch menu interaction (LP: #1667620, #1671069)
  * Fix real world submenus (e.g. kate) not getting their first item
    selected on open (LP: #1666859)

  [ Daniel d'Andrada ]
  * Really disable the window decoration when in staged mode (LP:
    #1670361)
  * Don't let clients resize their surfaces while in staged
    (phone/tablet) mode (LP: #1670390)
  * TopLevelWindowModel: don't put hidden windows in the model (LP:
    #1665286)

  [ Lukáš Tinkl ]
  * Reset always-show-osk gsetting on startup to default value (false
    atm)
  * Fix the restored-to position with Miral due to the state changes
    being async (LP: #1669819)
  * Add a cursor name fallback mapping "grabbing" -> "closedhand" for
    Breeze
  * Fix unsnapping a maximized window from the panel (LP: #1671721)
  * Disable altDrag feature outside windowed mode

  [ Michael Terry ]
  * Don't lock the screen for guest users or users in the nopasswdlogin
    group. (LP: #1644237)
  * Support GNOME-style logout DBus API (making the Logout, Reboot, and
    Shutdown launcher commands work) (LP: #1673229)

  [ Michael Zanetti ]
  * Add support for closing apps from the spread with "Q" (LP: #1670327)
  * hide "private" launcher quicklist entries when the greeter is locked
    (LP: #1667649)
  * add surface titles to launcher's quicklist (LP: #1661668)
  * properly reset the drawer state when cancelling a horizontal drag
    (LP: #1669536)
  * fix the focus moving correctly between launcher and drawer (LP:
    #1669880)
  * unfocus the drawer's textfield when it is moved (LP: #1669839)

  [ Pete Woods ]
  * Fix up indicators-client after refactoring (LP: #1672797)

 -- Michał Sawicz <email address hidden> Tue, 21 Mar 2017 10:58:13 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
milestone: u8c-1 → u8c-2
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+3.0 - 3.22.11-0ubuntu3

---------------
gtk+3.0 (3.22.11-0ubuntu3) zesty; urgency=medium

  * debian/patches/series:
  * debian/patches/0001-mir-always-emit-a-resize-when-creating-windows.patch:
  * debian/patches/0024-mir-re-write-settings-implementation.patch:
  * debian/patches/0025-mir-remove-keymap-and-input-device-state-warnings.patch:
  * debian/patches/0026-mir-set-application-name-when-creating-connection.patch:
    - Add upstream patches from gtk-3-22 branch
    - Fix LP: #1670390, LP: #1666435, LP: #1618298

 -- William Hua <email address hidden> Tue, 04 Apr 2017 14:31:11 -0400

Changed in gtk+3.0 (Ubuntu):
status: Fix Committed → Fix Released
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.