Mir

Merge lp:~alan-griffiths/mir/fix-1717910 into lp:mir

Proposed by Alan Griffiths on 2017-09-18
Status: Merged
Merged at revision: 4257
Proposed branch: lp:~alan-griffiths/mir/fix-1717910
Merge into: lp:mir
Diff against target: 116 lines (+38/-19)
4 files modified
debian/changelog (+2/-0)
examples/miral-kiosk/kiosk_window_manager.cpp (+30/-15)
examples/miral-kiosk/kiosk_window_manager.h (+5/-3)
include/miral/miral/canonical_window_manager.h (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1717910
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing on 2017-09-20
Gerry Boland 2017-09-18 Approve on 2017-09-19
Review via email: mp+330924@code.launchpad.net

Commit message

[miral-kiosk] Apply fullscreen logic when hidden windows are restored. (LP: #1717910)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4254
https://mir-jenkins.ubuntu.com/job/mir-ci/3668/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5021/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5254
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5242
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5242
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5242
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5064/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5064/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5064
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5064/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3668/rebuild

review: Needs Fixing (continuous-integration)
Gerry Boland (gerboland) wrote :

No change. Try a command like this:

QT_LOGGING_RULES=qt.qpa.*=true QT_QPA_PLATFORM=ubuntumirclient /usr/lib/x86_64-linux-gnu/qt5/examples/webkitqml/flickrview/flickrview

Qt is getting the resize event from Mir, but we've never trusted the resize event from Mir as it seldom reflected the next buffer size - so instead we forces a redraw, which pulls a new buffer from Mir, and we check that buffer size to see if it changes. We're not getting any buffer size change.

OFC adopting the new buffer semantics stuff would probably rectify that. But that's non-trivial work

review: Needs Fixing
Alan Griffiths (alan-griffiths) wrote :

> No change. Try a command like this:
>
> QT_LOGGING_RULES=qt.qpa.*=true QT_QPA_PLATFORM=ubuntumirclient /usr/lib/x86_64
> -linux-gnu/qt5/examples/webkitqml/flickrview/flickrview

Thanks for that. I had been testing with...

$ miral-app -kiosk

...and that was improved by the changes so far.

Alan Griffiths (alan-griffiths) wrote :

This seems OK for these test cases:

$ miral-app -kiosk -launcher /usr/lib/x86_64-linux-gnu/qt5/examples/webkitqml/flickrview/flickrview

$ miral-app -kiosk

Note that this breaks the following case:

$ miral-app -kiosk -launcher 'gnome-terminal --app-id com.canonical.miral.Terminal'

But I don't think we should care.

Alan Griffiths (alan-griffiths) wrote :

> Note that this breaks the following case:
>
> $ miral-app -kiosk -launcher 'gnome-terminal --app-id
> com.canonical.miral.Terminal'
>
> But I don't think we should care.

Basically, this is the code that should work but replaces incorrect code used to work around a gtk-mir bug.

As gtk-mir is /1/ unmaintained and being disable going forward and /2/ already broken in multiple ways on Xenial I don't think we should worry.

Gerry Boland (gerboland) wrote :

There is something subtly wrong still. I see a resize flicker for the fancybrowser on startup. Looking at the WM trace, there is a non-fullscreen resize request by Qt of the window while it is hidden that Mir appears to be respecting. See https://pastebin.ubuntu.com/25572675/ with annotations

Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4257
https://mir-jenkins.ubuntu.com/job/mir-ci/3669/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5023
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5256
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5244
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5066/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5066
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5066/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3669/rebuild

review: Approve (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

> There is something subtly wrong still. I see a resize flicker for the
> fancybrowser on startup. Looking at the WM trace, there is a non-fullscreen
> resize request by Qt of the window while it is hidden that Mir appears to be
> respecting. See https://pastebin.ubuntu.com/25572675/ with annotations

I don't see that here. But you're right - it doesn't make sense to respect resizing when hidden/hiding and change it once restored. Changed accordingly.

Gerry Boland (gerboland) wrote :

Thanks, working better now.

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4258
https://mir-jenkins.ubuntu.com/job/mir-ci/3670/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5024
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5257
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5245
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5245
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5245
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5067/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5067
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5067/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3670/rebuild

review: Approve (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1426/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5025/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1557/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5258
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5246
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5246
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5246
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5068/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5068/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5068/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5068/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5068/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5068/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5068/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5068
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5068/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1428/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5028/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1562/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5264
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5252
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5252
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5252
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5071/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5071
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5071/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5071/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5071
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5071/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5071
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5071/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5071
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5071/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5071
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5071/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5071/console

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

:(

12:13:07 The following tests FAILED:
12:13:07 11 - mir_acceptance_tests (Failed)
12:13:07 16 - mir_integration_tests (Failed)
12:13:07 22 - mir_unit_tests (Failed)
12:13:07 31 - mir_unit_tests_nested (Failed)

https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5071/console

10:58:41 The following tests FAILED:
10:58:41 9 - mir_acceptance_tests (Failed)
10:58:41 14 - mir_integration_tests (Failed)
10:58:41 20 - mir_unit_tests (Failed)
10:58:41 29 - mir_unit_tests_nested (Failed)

https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/5071/arch=amd64,compiler=clang,platform=mesa,release=artful/console

Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1429/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5029/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1563/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5265
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5253
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5253
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5253
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5072/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5072/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5072/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5072/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5072/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5072/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5072/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5072
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5072/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

And again.

It seems valgrind is reporting errors on artful that were not there yesterday. (And have nothing to do with this MP as I can reproduce on trunk.)

Committing by hand

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-09-15 14:57:53 +0000
3+++ debian/changelog 2017-09-19 14:51:23 +0000
4@@ -49,6 +49,8 @@
5 . Make racy DragAndDrop test reliable. (LP: #1704780)
6 . [libmiral] Define default window settings in one place and clamp the
7 actual values to avoid ldiv0. (LP: #1717061)
8+ . [miral-kiosk] Apply fullscreen logic when hidden windows are restored.
9+ (LP: #1717910)
10
11 -- Alan Griffiths <alan.griffiths@canonical.com> Thu, 10 Aug 2017 11:54:30 +0000
12
13
14=== modified file 'examples/miral-kiosk/kiosk_window_manager.cpp'
15--- examples/miral-kiosk/kiosk_window_manager.cpp 2017-08-21 15:05:23 +0000
16+++ examples/miral-kiosk/kiosk_window_manager.cpp 2017-09-19 14:51:23 +0000
17@@ -1,5 +1,5 @@
18 /*
19- * Copyright © 2016 Canonical Ltd.
20+ * Copyright © 2016-2017 Canonical Ltd.
21 *
22 * This program is free software: you can redistribute it and/or modify it
23 * under the terms of the GNU General Public License version 2 or 3 as
24@@ -128,21 +128,36 @@
25 }
26 }
27
28-void KioskWindowManagerPolicy::advise_new_window(WindowInfo const& window_info)
29-{
30- // We do this here, not in place_new_window() so that clients get a resize event.
31- // This shouldn't be necessary, but works better with the gtk-mir backend.
32- if (window_info.type() == mir_window_type_normal &&
33- !window_info.parent() &&
34- window_info.state() == mir_window_state_restored)
35- {
36- WindowSpecification specification;
37-
38- specification.state() = mir_window_state_maximized;
39-
40+auto KioskWindowManagerPolicy::place_new_window(ApplicationInfo const& app_info, WindowSpecification const& request)
41+-> WindowSpecification
42+{
43+ WindowSpecification specification = CanonicalWindowManagerPolicy::place_new_window(app_info, request);
44+
45+ if (specification.type() == mir_window_type_normal &&
46+ (!specification.parent().is_set() || !specification.parent().value().lock()))
47+ {
48+ specification.state() = mir_window_state_maximized;
49+ tools.place_and_size_for_state(specification, WindowInfo{});
50+
51+ if (!request.state().is_set() || request.state().value() != mir_window_state_restored)
52+ specification.state() = request.state();
53+ }
54+
55+ return specification;
56+}
57+
58+void KioskWindowManagerPolicy::handle_modify_window(WindowInfo& window_info, WindowSpecification const& modifications)
59+{
60+ WindowSpecification specification = modifications;
61+
62+ if (window_info.type() == mir_window_type_normal && !window_info.parent())
63+ {
64+ specification.state() = mir_window_state_maximized;
65 tools.place_and_size_for_state(specification, window_info);
66- tools.modify_window(window_info.window(), specification);
67+
68+ if (!modifications.state().is_set() || modifications.state().value() != mir_window_state_restored)
69+ specification.state() = modifications.state();
70 }
71
72- CanonicalWindowManagerPolicy::advise_new_window(window_info);
73+ CanonicalWindowManagerPolicy::handle_modify_window(window_info, specification);
74 }
75
76=== modified file 'examples/miral-kiosk/kiosk_window_manager.h'
77--- examples/miral-kiosk/kiosk_window_manager.h 2017-08-21 15:05:23 +0000
78+++ examples/miral-kiosk/kiosk_window_manager.h 2017-09-19 14:51:23 +0000
79@@ -1,5 +1,5 @@
80 /*
81- * Copyright © 2016 Canonical Ltd.
82+ * Copyright © 2016-2017 Canonical Ltd.
83 *
84 * This program is free software: you can redistribute it and/or modify it
85 * under the terms of the GNU General Public License version 2 or 3 as
86@@ -30,13 +30,15 @@
87 public:
88 KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, SwSplash const&);
89
90+ auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request)
91+ -> miral::WindowSpecification override;
92+
93 void advise_focus_gained(miral::WindowInfo const& info) override;
94
95- virtual void advise_new_window(miral::WindowInfo const& window_info) override;
96-
97 bool handle_keyboard_event(MirKeyboardEvent const* event) override;
98 bool handle_touch_event(MirTouchEvent const* event) override;
99 bool handle_pointer_event(MirPointerEvent const* event) override;
100+ void handle_modify_window(miral::WindowInfo& window_info, miral::WindowSpecification const& modifications) override;
101
102 private:
103 static const int modifier_mask =
104
105=== modified file 'include/miral/miral/canonical_window_manager.h'
106--- include/miral/miral/canonical_window_manager.h 2017-08-21 14:18:55 +0000
107+++ include/miral/miral/canonical_window_manager.h 2017-09-19 14:51:23 +0000
108@@ -31,7 +31,7 @@
109
110 explicit CanonicalWindowManagerPolicy(WindowManagerTools const& tools);
111
112- auto place_new_window(
113+ virtual auto place_new_window(
114 ApplicationInfo const& app_info,
115 WindowSpecification const& request_parameters)
116 -> WindowSpecification override;

Subscribers

People subscribed via source and target branches