Merge lp:~alan-griffiths/mir/fix-1717910 into lp:mir
- fix-1717910
- Merge into development-branch
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 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Gerry Boland (community) | Approve | ||
Review via email: mp+330924@code.launchpad.net |
Commit message
[miral-kiosk] Apply fullscreen logic when hidden windows are restored. (LP: #1717910)
Description of the change
Mir CI Bot (mir-ci-bot) wrote : | # |
Gerry Boland (gerboland) wrote : | # |
No change. Try a command like this:
QT_LOGGING_
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
Alan Griffiths (alan-griffiths) wrote : | # |
> No change. Try a command like this:
>
> QT_LOGGING_
> -linux-
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/
$ miral-app -kiosk
Note that this breaks the following case:
$ miral-app -kiosk -launcher 'gnome-terminal --app-id com.canonical.
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.
>
> 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:/
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4257
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
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:/
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.
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4258
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
ABORTED: https:/
ABORTED: https:/
SUCCESS: https:/
deb: https:/
ABORTED: https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Alan Griffiths (alan-griffiths) wrote : | # |
:(
12:13:07 The following tests FAILED:
12:13:07 11 - mir_acceptance_
12:13:07 16 - mir_integration
12:13:07 22 - mir_unit_tests (Failed)
12:13:07 31 - mir_unit_
10:58:41 The following tests FAILED:
10:58:41 9 - mir_acceptance_
10:58:41 14 - mir_integration
10:58:41 20 - mir_unit_tests (Failed)
10:58:41 29 - mir_unit_
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
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
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 | 49 | . Make racy DragAndDrop test reliable. (LP: #1704780) | 49 | . Make racy DragAndDrop test reliable. (LP: #1704780) |
6 | 50 | . [libmiral] Define default window settings in one place and clamp the | 50 | . [libmiral] Define default window settings in one place and clamp the |
7 | 51 | actual values to avoid ldiv0. (LP: #1717061) | 51 | actual values to avoid ldiv0. (LP: #1717061) |
8 | 52 | . [miral-kiosk] Apply fullscreen logic when hidden windows are restored. | ||
9 | 53 | (LP: #1717910) | ||
10 | 52 | 54 | ||
11 | 53 | -- Alan Griffiths <alan.griffiths@canonical.com> Thu, 10 Aug 2017 11:54:30 +0000 | 55 | -- Alan Griffiths <alan.griffiths@canonical.com> Thu, 10 Aug 2017 11:54:30 +0000 |
12 | 54 | 56 | ||
13 | 55 | 57 | ||
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 | 1 | /* | 1 | /* |
20 | 2 | * Copyright © 2016 Canonical Ltd. | 2 | * Copyright © 2016-2017 Canonical Ltd. |
21 | 3 | * | 3 | * |
22 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
23 | 5 | * under the terms of the GNU General Public License version 2 or 3 as | 5 | * under the terms of the GNU General Public License version 2 or 3 as |
24 | @@ -128,21 +128,36 @@ | |||
25 | 128 | } | 128 | } |
26 | 129 | } | 129 | } |
27 | 130 | 130 | ||
40 | 131 | void KioskWindowManagerPolicy::advise_new_window(WindowInfo const& window_info) | 131 | auto KioskWindowManagerPolicy::place_new_window(ApplicationInfo const& app_info, WindowSpecification const& request) |
41 | 132 | { | 132 | -> WindowSpecification |
42 | 133 | // We do this here, not in place_new_window() so that clients get a resize event. | 133 | { |
43 | 134 | // This shouldn't be necessary, but works better with the gtk-mir backend. | 134 | WindowSpecification specification = CanonicalWindowManagerPolicy::place_new_window(app_info, request); |
44 | 135 | if (window_info.type() == mir_window_type_normal && | 135 | |
45 | 136 | !window_info.parent() && | 136 | if (specification.type() == mir_window_type_normal && |
46 | 137 | window_info.state() == mir_window_state_restored) | 137 | (!specification.parent().is_set() || !specification.parent().value().lock())) |
47 | 138 | { | 138 | { |
48 | 139 | WindowSpecification specification; | 139 | specification.state() = mir_window_state_maximized; |
49 | 140 | 140 | tools.place_and_size_for_state(specification, WindowInfo{}); | |
50 | 141 | specification.state() = mir_window_state_maximized; | 141 | |
51 | 142 | 142 | if (!request.state().is_set() || request.state().value() != mir_window_state_restored) | |
52 | 143 | specification.state() = request.state(); | ||
53 | 144 | } | ||
54 | 145 | |||
55 | 146 | return specification; | ||
56 | 147 | } | ||
57 | 148 | |||
58 | 149 | void KioskWindowManagerPolicy::handle_modify_window(WindowInfo& window_info, WindowSpecification const& modifications) | ||
59 | 150 | { | ||
60 | 151 | WindowSpecification specification = modifications; | ||
61 | 152 | |||
62 | 153 | if (window_info.type() == mir_window_type_normal && !window_info.parent()) | ||
63 | 154 | { | ||
64 | 155 | specification.state() = mir_window_state_maximized; | ||
65 | 143 | tools.place_and_size_for_state(specification, window_info); | 156 | tools.place_and_size_for_state(specification, window_info); |
67 | 144 | tools.modify_window(window_info.window(), specification); | 157 | |
68 | 158 | if (!modifications.state().is_set() || modifications.state().value() != mir_window_state_restored) | ||
69 | 159 | specification.state() = modifications.state(); | ||
70 | 145 | } | 160 | } |
71 | 146 | 161 | ||
73 | 147 | CanonicalWindowManagerPolicy::advise_new_window(window_info); | 162 | CanonicalWindowManagerPolicy::handle_modify_window(window_info, specification); |
74 | 148 | } | 163 | } |
75 | 149 | 164 | ||
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 | 1 | /* | 1 | /* |
82 | 2 | * Copyright © 2016 Canonical Ltd. | 2 | * Copyright © 2016-2017 Canonical Ltd. |
83 | 3 | * | 3 | * |
84 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
85 | 5 | * under the terms of the GNU General Public License version 2 or 3 as | 5 | * under the terms of the GNU General Public License version 2 or 3 as |
86 | @@ -30,13 +30,15 @@ | |||
87 | 30 | public: | 30 | public: |
88 | 31 | KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, SwSplash const&); | 31 | KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, SwSplash const&); |
89 | 32 | 32 | ||
90 | 33 | auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request) | ||
91 | 34 | -> miral::WindowSpecification override; | ||
92 | 35 | |||
93 | 33 | void advise_focus_gained(miral::WindowInfo const& info) override; | 36 | void advise_focus_gained(miral::WindowInfo const& info) override; |
94 | 34 | 37 | ||
95 | 35 | virtual void advise_new_window(miral::WindowInfo const& window_info) override; | ||
96 | 36 | |||
97 | 37 | bool handle_keyboard_event(MirKeyboardEvent const* event) override; | 38 | bool handle_keyboard_event(MirKeyboardEvent const* event) override; |
98 | 38 | bool handle_touch_event(MirTouchEvent const* event) override; | 39 | bool handle_touch_event(MirTouchEvent const* event) override; |
99 | 39 | bool handle_pointer_event(MirPointerEvent const* event) override; | 40 | bool handle_pointer_event(MirPointerEvent const* event) override; |
100 | 41 | void handle_modify_window(miral::WindowInfo& window_info, miral::WindowSpecification const& modifications) override; | ||
101 | 40 | 42 | ||
102 | 41 | private: | 43 | private: |
103 | 42 | static const int modifier_mask = | 44 | static const int modifier_mask = |
104 | 43 | 45 | ||
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 | 31 | 31 | ||
110 | 32 | explicit CanonicalWindowManagerPolicy(WindowManagerTools const& tools); | 32 | explicit CanonicalWindowManagerPolicy(WindowManagerTools const& tools); |
111 | 33 | 33 | ||
113 | 34 | auto place_new_window( | 34 | virtual auto place_new_window( |
114 | 35 | ApplicationInfo const& app_info, | 35 | ApplicationInfo const& app_info, |
115 | 36 | WindowSpecification const& request_parameters) | 36 | WindowSpecification const& request_parameters) |
116 | 37 | -> WindowSpecification override; | 37 | -> WindowSpecification override; |
FAILED: Continuous integration, rev:4254 /mir-jenkins. ubuntu. com/job/ mir-ci/ 3668/ /mir-jenkins. ubuntu. com/job/ build-mir/ 5021/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/5254 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= artful/ 5242 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 5242 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/5242 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= artful/ 5064/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/5064/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 5064/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 5064/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/5064/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 5064/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/5064/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 5064 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 5064/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 3668/rebuild
https:/