Merge lp:~lukas-kde/unity8/fix-shell-chrome into lp:unity8
- fix-shell-chrome
- Merge into trunk
Status: | Superseded | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~lukas-kde/unity8/fix-shell-chrome | ||||||||||||||||
Merge into: | lp:unity8 | ||||||||||||||||
Prerequisite: | lp:~ci-train-bot/unity8/unity8-ubuntu-zesty-2481 | ||||||||||||||||
Diff against target: |
276 lines (+55/-40) 5 files modified
qml/Stage/Stage.qml (+35/-13) qml/Stage/StagedFullscreenPolicy.qml (+7/-5) qml/Stage/WindowStateSaver.qml (+2/-1) qml/Stage/WindowedFullscreenPolicy.qml (+5/-11) tests/qmltests/tst_Shell.qml (+6/-10) |
||||||||||||||||
To merge this branch: | bzr merge lp:~lukas-kde/unity8/fix-shell-chrome | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Unity Team | Pending | ||
Review via email: mp+318010@code.launchpad.net |
This proposal has been superseded by a proposal from 2017-02-22.
Commit message
Shell chrome fixes
Correctly save and load the window state from storage, do not restore our QML window right away but queue the state, filter it with the shell chrome policy (when in windowed mode) later on, and then apply it at altogether, once the surface creation is settled.
For a more elegant longterm fix, we should probably introduce "initialSurface
Description of the change
Shell chrome fixes
Daniel d'Andrada (dandrader) wrote : | # |
Daniel d'Andrada (dandrader) wrote : | # |
would be great if you could split the timer hack from the other, uncontroversial, proper fixes.
- 2835. By Lukáš Tinkl
-
shell chrome fixes
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2835
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: 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:/
Click here to trigger a rebuild:
https:/
- 2836. By Lukáš Tinkl
-
fix some tests now that camera-app is no longer fullscreen in windowed mode ;)
- 2837. By Lukáš Tinkl
-
more test fixes
- 2838. By Lukáš Tinkl
-
load/init the values in every case
- 2839. By Lukáš Tinkl
-
w/o timer
- 2840. By Lukáš Tinkl
-
cascade, then onWindowReady load and apply the state
- 2841. By Lukáš Tinkl
-
fix typo
- 2842. By Lukáš Tinkl
-
simplify
- 2843. By Lukáš Tinkl
-
fix the staged shell chrome policy
- 2844. By Lukáš Tinkl
-
revert initialSurfaceSize condition
- 2845. By Lukáš Tinkl
-
merge trunk
- 2846. By Lukáš Tinkl
-
merge lp:~dandrader/unity8/fix-shell-chrome
saves one appDelegate property
- 2847. By Lukáš Tinkl
-
fix the test assumption that mock camera-app will always be fullscreen
- 2848. By Lukáš Tinkl
-
stabilize test
- 2849. By Lukáš Tinkl
-
always save the size/state, fixes closing app in staged mode and then restarting in windowed mode
- 2850. By Lukáš Tinkl
-
fix warning
- 2851. By Lukáš Tinkl
-
try to stabilize Shell::
test_spreadDisa bled()
Unmerged revisions
Preview Diff
1 | === modified file 'qml/Stage/Stage.qml' | |||
2 | --- qml/Stage/Stage.qml 2017-02-16 13:44:45 +0000 | |||
3 | +++ qml/Stage/Stage.qml 2017-02-22 17:48:13 +0000 | |||
4 | @@ -470,7 +470,7 @@ | |||
5 | 470 | extend: "stagedRightEdge" | 470 | extend: "stagedRightEdge" |
6 | 471 | PropertyChanges { | 471 | PropertyChanges { |
7 | 472 | target: sideStage | 472 | target: sideStage |
9 | 473 | opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0 | 473 | opacity: priv.sideStageDelegate && priv.sideStageDelegate.x === sideStage.x ? 1 : 0 |
10 | 474 | visible: true | 474 | visible: true |
11 | 475 | } | 475 | } |
12 | 476 | }, | 476 | }, |
13 | @@ -723,6 +723,7 @@ | |||
14 | 723 | // miral doesn't know about our window decorations. So we have to deduct them | 723 | // miral doesn't know about our window decorations. So we have to deduct them |
15 | 724 | value: Qt.point(appDelegate.requestedX + appDelegate.clientAreaItem.x, | 724 | value: Qt.point(appDelegate.requestedX + appDelegate.clientAreaItem.x, |
16 | 725 | appDelegate.requestedY + appDelegate.clientAreaItem.y) | 725 | appDelegate.requestedY + appDelegate.clientAreaItem.y) |
17 | 726 | when: root.mode == "windowed" | ||
18 | 726 | } | 727 | } |
19 | 727 | 728 | ||
20 | 728 | // In those are for windowed mode. Those values basically store the window's properties | 729 | // In those are for windowed mode. Those values basically store the window's properties |
21 | @@ -768,7 +769,6 @@ | |||
22 | 768 | Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height)))) | 769 | Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height)))) |
23 | 769 | when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored") | 770 | when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored") |
24 | 770 | && root.inputMethodRect.height > 0 | 771 | && root.inputMethodRect.height > 0 |
25 | 771 | |||
26 | 772 | } | 772 | } |
27 | 773 | 773 | ||
28 | 774 | Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} } | 774 | Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} } |
29 | @@ -933,7 +933,8 @@ | |||
30 | 933 | } else if (model.window.state === Mir.MaximizedBottomRightState) { | 933 | } else if (model.window.state === Mir.MaximizedBottomRightState) { |
31 | 934 | appDelegate.maximizeBottomRight(); | 934 | appDelegate.maximizeBottomRight(); |
32 | 935 | } else if (model.window.state === Mir.RestoredState) { | 935 | } else if (model.window.state === Mir.RestoredState) { |
34 | 936 | if (appDelegate.fullscreen && appDelegate.prevWindowState != WindowStateStorage.WindowStateRestored) { | 936 | if (appDelegate.fullscreen && appDelegate.prevWindowState != WindowStateStorage.WindowStateRestored |
35 | 937 | && appDelegate.prevWindowState != WindowStateStorage.WindowStateNormal) { | ||
36 | 937 | model.window.requestState(WindowStateStorage.toMirState(appDelegate.prevWindowState)); | 938 | model.window.requestState(WindowStateStorage.toMirState(appDelegate.prevWindowState)); |
37 | 938 | } else { | 939 | } else { |
38 | 939 | appDelegate.restore(); | 940 | appDelegate.restore(); |
39 | @@ -945,6 +946,22 @@ | |||
40 | 945 | } | 946 | } |
41 | 946 | } | 947 | } |
42 | 947 | 948 | ||
43 | 949 | // queue the requests to change the window/surface state | ||
44 | 950 | Timer { | ||
45 | 951 | id: delayedStateTimer | ||
46 | 952 | property int windowState: -1 // Mir::State | ||
47 | 953 | interval: 1000 | ||
48 | 954 | onTriggered: { | ||
49 | 955 | if (delayedStateTimer.windowState != -1) { | ||
50 | 956 | if (windowedFullscreenPolicy.active) { // need to apply the windowed shell chrome policy on top the saved window state | ||
51 | 957 | delayedStateTimer.windowState = windowedFullscreenPolicy.applyPolicy(delayedStateTimer.windowState, appDelegate.surface.shellChrome); | ||
52 | 958 | } | ||
53 | 959 | appDelegate.window.requestState(delayedStateTimer.windowState); | ||
54 | 960 | delayedStateTimer.windowState = -1; | ||
55 | 961 | } | ||
56 | 962 | } | ||
57 | 963 | } | ||
58 | 964 | |||
59 | 948 | Component.onCompleted: { | 965 | Component.onCompleted: { |
60 | 949 | if (application && application.rotatesWindowContents) { | 966 | if (application && application.rotatesWindowContents) { |
61 | 950 | decoratedWindow.surfaceOrientationAngle = shellOrientationAngle; | 967 | decoratedWindow.surfaceOrientationAngle = shellOrientationAngle; |
62 | @@ -955,9 +972,12 @@ | |||
63 | 955 | // First, cascade the newly created window, relative to the currently/old focused window. | 972 | // First, cascade the newly created window, relative to the currently/old focused window. |
64 | 956 | windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3) | 973 | windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3) |
65 | 957 | windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3) | 974 | windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3) |
69 | 958 | // Now load any saved state. This needs to happen *after* the cascading! | 975 | |
70 | 959 | windowStateSaver.load(); | 976 | if (root.mode == "windowed") { |
71 | 960 | model.window.requestState(WindowStateStorage.toMirState(windowState)); | 977 | // Now load any saved state. This needs to happen *after* the cascading! |
72 | 978 | delayedStateTimer.windowState = WindowStateStorage.toMirState(windowStateSaver.load()); | ||
73 | 979 | delayedStateTimer.restart(); | ||
74 | 980 | } | ||
75 | 961 | 981 | ||
76 | 962 | updateQmlFocusFromMirSurfaceFocus(); | 982 | updateQmlFocusFromMirSurfaceFocus(); |
77 | 963 | 983 | ||
78 | @@ -965,7 +985,9 @@ | |||
79 | 965 | _constructing = false; | 985 | _constructing = false; |
80 | 966 | } | 986 | } |
81 | 967 | Component.onDestruction: { | 987 | Component.onDestruction: { |
83 | 968 | windowStateSaver.save(); | 988 | if (root.mode == "windowed") { |
84 | 989 | windowStateSaver.save(); | ||
85 | 990 | } | ||
86 | 969 | 991 | ||
87 | 970 | if (!root.parent) { | 992 | if (!root.parent) { |
88 | 971 | // This stage is about to be destroyed. Don't mess up with the model at this point | 993 | // This stage is about to be destroyed. Don't mess up with the model at this point |
89 | @@ -1441,7 +1463,7 @@ | |||
90 | 1441 | ] | 1463 | ] |
91 | 1442 | transitions: [ | 1464 | transitions: [ |
92 | 1443 | Transition { | 1465 | Transition { |
94 | 1444 | from: "staged,stagedWithSideStage"; to: "normal" | 1466 | from: "staged,stagedWithSideStage" |
95 | 1445 | enabled: appDelegate.animationsEnabled | 1467 | enabled: appDelegate.animationsEnabled |
96 | 1446 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } | 1468 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } |
97 | 1447 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration } | 1469 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration } |
98 | @@ -1462,8 +1484,7 @@ | |||
99 | 1462 | }, | 1484 | }, |
100 | 1463 | Transition { | 1485 | Transition { |
101 | 1464 | from: "normal,staged"; to: "stagedWithSideStage" | 1486 | from: "normal,staged"; to: "stagedWithSideStage" |
104 | 1465 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration } | 1487 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration } |
103 | 1466 | UbuntuNumberAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration } | ||
105 | 1467 | }, | 1488 | }, |
106 | 1468 | Transition { | 1489 | Transition { |
107 | 1469 | to: "windowedRightEdge" | 1490 | to: "windowedRightEdge" |
108 | @@ -1503,7 +1524,6 @@ | |||
109 | 1503 | from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" | 1524 | from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" |
110 | 1504 | to: "minimized" | 1525 | to: "minimized" |
111 | 1505 | SequentialAnimation { | 1526 | SequentialAnimation { |
112 | 1506 | ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) } | ||
113 | 1507 | ScriptAction { script: { fakeRectangle.stop(); } } | 1527 | ScriptAction { script: { fakeRectangle.stop(); } } |
114 | 1508 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } | 1528 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } |
115 | 1509 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,scale,opacity"; duration: priv.animationDuration } | 1529 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,scale,opacity"; duration: priv.animationDuration } |
116 | @@ -1514,7 +1534,6 @@ | |||
117 | 1514 | from: "minimized" | 1534 | from: "minimized" |
118 | 1515 | to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" | 1535 | to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" |
119 | 1516 | SequentialAnimation { | 1536 | SequentialAnimation { |
120 | 1517 | ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) } | ||
121 | 1518 | PropertyAction { target: appDelegate; property: "visuallyMinimized,z" } | 1537 | PropertyAction { target: appDelegate; property: "visuallyMinimized,z" } |
122 | 1519 | ParallelAnimation { | 1538 | ParallelAnimation { |
123 | 1520 | UbuntuNumberAnimation { target: appDelegate; properties: "x"; from: -appDelegate.width / 2; duration: priv.animationDuration } | 1539 | UbuntuNumberAnimation { target: appDelegate; properties: "x"; from: -appDelegate.width / 2; duration: priv.animationDuration } |
124 | @@ -1662,12 +1681,15 @@ | |||
125 | 1662 | WindowedFullscreenPolicy { | 1681 | WindowedFullscreenPolicy { |
126 | 1663 | id: windowedFullscreenPolicy | 1682 | id: windowedFullscreenPolicy |
127 | 1664 | active: root.mode == "windowed" | 1683 | active: root.mode == "windowed" |
128 | 1665 | surface: model.window.surface | ||
129 | 1666 | } | 1684 | } |
130 | 1667 | StagedFullscreenPolicy { | 1685 | StagedFullscreenPolicy { |
131 | 1668 | id: stagedFullscreenPolicy | 1686 | id: stagedFullscreenPolicy |
132 | 1669 | active: root.mode == "staged" || root.mode == "stagedWithSideStage" | 1687 | active: root.mode == "staged" || root.mode == "stagedWithSideStage" |
133 | 1670 | surface: model.window.surface | 1688 | surface: model.window.surface |
134 | 1689 | onStateRequested: { | ||
135 | 1690 | delayedStateTimer.windowState = requestedState; | ||
136 | 1691 | delayedStateTimer.restart(); | ||
137 | 1692 | } | ||
138 | 1671 | } | 1693 | } |
139 | 1672 | 1694 | ||
140 | 1673 | SpreadDelegateInputArea { | 1695 | SpreadDelegateInputArea { |
141 | 1674 | 1696 | ||
142 | === modified file 'qml/Stage/StagedFullscreenPolicy.qml' | |||
143 | --- qml/Stage/StagedFullscreenPolicy.qml 2016-11-30 19:24:02 +0000 | |||
144 | +++ qml/Stage/StagedFullscreenPolicy.qml 2017-02-22 17:48:13 +0000 | |||
145 | @@ -28,11 +28,13 @@ | |||
146 | 28 | QtObject { | 28 | QtObject { |
147 | 29 | property bool active: true | 29 | property bool active: true |
148 | 30 | 30 | ||
149 | 31 | signal stateRequested(int requestedState) | ||
150 | 32 | |||
151 | 31 | property var surface: null | 33 | property var surface: null |
152 | 32 | onSurfaceChanged: { | 34 | onSurfaceChanged: { |
153 | 33 | if (!active || !surface) return; | 35 | if (!active || !surface) return; |
154 | 34 | if (surface.shellChrome === Mir.LowChrome) { | 36 | if (surface.shellChrome === Mir.LowChrome) { |
156 | 35 | surface.requestState(Mir.FullscreenState); | 37 | stateRequested(Mir.FullscreenState); |
157 | 36 | } | 38 | } |
158 | 37 | } | 39 | } |
159 | 38 | 40 | ||
160 | @@ -41,15 +43,15 @@ | |||
161 | 41 | onShellChromeChanged: { | 43 | onShellChromeChanged: { |
162 | 42 | if (!active || !surface) return; | 44 | if (!active || !surface) return; |
163 | 43 | if (surface.shellChrome === Mir.LowChrome) { | 45 | if (surface.shellChrome === Mir.LowChrome) { |
165 | 44 | surface.requestState(Mir.FullscreenState); | 46 | stateRequested(Mir.FullscreenState); |
166 | 45 | } else { | 47 | } else { |
168 | 46 | surface.requestState(Mir.RestoredState); | 48 | stateRequested(Mir.RestoredState); |
169 | 47 | } | 49 | } |
170 | 48 | } | 50 | } |
171 | 49 | onStateChanged: { | 51 | onStateChanged: { |
173 | 50 | if (!active) return; | 52 | if (!active || !surface) return; |
174 | 51 | if (surface.state === Mir.RestoredState && surface.shellChrome === Mir.LowChrome) { | 53 | if (surface.state === Mir.RestoredState && surface.shellChrome === Mir.LowChrome) { |
176 | 52 | surface.requestState(Mir.FullscreenState); | 54 | stateRequested(Mir.FullscreenState); |
177 | 53 | } | 55 | } |
178 | 54 | } | 56 | } |
179 | 55 | } | 57 | } |
180 | 56 | 58 | ||
181 | === modified file 'qml/Stage/WindowStateSaver.qml' | |||
182 | --- qml/Stage/WindowStateSaver.qml 2016-11-23 18:43:48 +0000 | |||
183 | +++ qml/Stage/WindowStateSaver.qml 2017-02-22 17:48:13 +0000 | |||
184 | @@ -42,13 +42,14 @@ | |||
185 | 42 | target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, screenHeight - target.windowedHeight), minimumY); }); | 42 | target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, screenHeight - target.windowedHeight), minimumY); }); |
186 | 43 | 43 | ||
187 | 44 | var windowState = WindowStateStorage.getState(target.appId, WindowStateStorage.WindowStateNormal) | 44 | var windowState = WindowStateStorage.getState(target.appId, WindowStateStorage.WindowStateNormal) |
188 | 45 | target.restore(false /* animated */, windowState); | ||
189 | 46 | 45 | ||
190 | 47 | target.updateNormalGeometry(); | 46 | target.updateNormalGeometry(); |
191 | 48 | 47 | ||
192 | 49 | // initialize the x/y to restore to | 48 | // initialize the x/y to restore to |
193 | 50 | target.restoredX = target.normalX; | 49 | target.restoredX = target.normalX; |
194 | 51 | target.restoredY = target.normalY; | 50 | target.restoredY = target.normalY; |
195 | 51 | |||
196 | 52 | return windowState; | ||
197 | 52 | } | 53 | } |
198 | 53 | 54 | ||
199 | 54 | function save() { | 55 | function save() { |
200 | 55 | 56 | ||
201 | === modified file 'qml/Stage/WindowedFullscreenPolicy.qml' | |||
202 | --- qml/Stage/WindowedFullscreenPolicy.qml 2016-11-30 19:24:02 +0000 | |||
203 | +++ qml/Stage/WindowedFullscreenPolicy.qml 2017-02-22 17:48:13 +0000 | |||
204 | @@ -23,17 +23,11 @@ | |||
205 | 23 | // state of the window is returned to restored. | 23 | // state of the window is returned to restored. |
206 | 24 | QtObject { | 24 | QtObject { |
207 | 25 | property bool active: true | 25 | property bool active: true |
219 | 26 | property QtObject surface: null | 26 | |
220 | 27 | 27 | function applyPolicy(surfaceState, surfaceChrome) { | |
221 | 28 | property bool _firstTimeSurface: true | 28 | if (surfaceState === Mir.FullscreenState && surfaceChrome === Mir.LowChrome) { |
222 | 29 | 29 | return Mir.RestoredState; | |
212 | 30 | onSurfaceChanged: { | ||
213 | 31 | if (!active || !surface) return; | ||
214 | 32 | if (!_firstTimeSurface) return; | ||
215 | 33 | _firstTimeSurface = false; | ||
216 | 34 | |||
217 | 35 | if (surface.state === Mir.FullscreenState && surface.shellChrome === Mir.LowChrome) { | ||
218 | 36 | surface.requestState(Mir.RestoredState); | ||
223 | 37 | } | 30 | } |
224 | 31 | return surfaceState; | ||
225 | 38 | } | 32 | } |
226 | 39 | } | 33 | } |
227 | 40 | 34 | ||
228 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
229 | --- tests/qmltests/tst_Shell.qml 2017-02-16 13:46:11 +0000 | |||
230 | +++ tests/qmltests/tst_Shell.qml 2017-02-22 17:48:13 +0000 | |||
231 | @@ -334,7 +334,7 @@ | |||
232 | 334 | 334 | ||
233 | 335 | Row { | 335 | Row { |
234 | 336 | CheckBox { | 336 | CheckBox { |
236 | 337 | id: fullscreeAppCheck | 337 | id: fullscreenAppCheck |
237 | 338 | activeFocusOnPress: false | 338 | activeFocusOnPress: false |
238 | 339 | activeFocusOnTab: false | 339 | activeFocusOnTab: false |
239 | 340 | 340 | ||
240 | @@ -348,13 +348,10 @@ | |||
241 | 348 | } | 348 | } |
242 | 349 | 349 | ||
243 | 350 | Binding { | 350 | Binding { |
245 | 351 | target: fullscreeAppCheck | 351 | target: fullscreenAppCheck |
246 | 352 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow | 352 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow |
247 | 353 | property: "checked" | 353 | property: "checked" |
252 | 354 | value: { | 354 | value: topLevelSurfaceList.focusedWindow.state === Mir.FullscreenState |
249 | 355 | if (!topLevelSurfaceList || !topLevelSurfaceList.focusedWindow) return false; | ||
250 | 356 | return topLevelSurfaceList.focusedWindow.state === Mir.FullscreenState | ||
251 | 357 | } | ||
253 | 358 | } | 355 | } |
254 | 359 | } | 356 | } |
255 | 360 | Label { | 357 | Label { |
256 | @@ -365,6 +362,8 @@ | |||
257 | 365 | Row { | 362 | Row { |
258 | 366 | CheckBox { | 363 | CheckBox { |
259 | 367 | id: chromeAppCheck | 364 | id: chromeAppCheck |
260 | 365 | activeFocusOnPress: false | ||
261 | 366 | activeFocusOnTab: false | ||
262 | 368 | 367 | ||
263 | 369 | onTriggered: { | 368 | onTriggered: { |
264 | 370 | if (!topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return; | 369 | if (!topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return; |
265 | @@ -380,10 +379,7 @@ | |||
266 | 380 | target: chromeAppCheck | 379 | target: chromeAppCheck |
267 | 381 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow !== null && topLevelSurfaceList.focusedWindow.surface !== null | 380 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow !== null && topLevelSurfaceList.focusedWindow.surface !== null |
268 | 382 | property: "checked" | 381 | property: "checked" |
273 | 383 | value: { | 382 | value: topLevelSurfaceList.focusedWindow.surface.shellChrome === Mir.LowChrome |
270 | 384 | if (!topLevelSurfaceList || !topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return false; | ||
271 | 385 | topLevelSurfaceList.focusedWindow.surface.shellChrome === Mir.LowChrome | ||
272 | 386 | } | ||
274 | 387 | } | 383 | } |
275 | 388 | } | 384 | } |
276 | 389 | Label { | 385 | Label { |
"""
interval: 1000
"""
Why 1000 and not 500 or 2000. Do you know what are you waiting for more exactly?