on xenial help sign in
make sure to play the minimized animation before switching focus to next
24930cfLukáš Tinkl
qml/Stages/DesktopStage.qml+10−4
@@ -269,9 +269,6 @@ Rectangle {
269 function minimize(animated) {
269 function minimize(animated) {
270 animationsEnabled = (animated === undefined) || animated;
270 animationsEnabled = (animated === undefined) || animated;
271 minimized = true;
271 minimized = true;
272− if (!!animated) {
273− priv.focusNext();
274− }
275 }
272 }
276 function restore(animated) {
273 function restore(animated) {
277 animationsEnabled = (animated === undefined) || animated;
274 animationsEnabled = (animated === undefined) || animated;
@@ -319,7 +316,16 @@ Rectangle {
319 from: "maximized,maximizedLeft,maximizedRight,minimized,normal,"
316 from: "maximized,maximizedLeft,maximizedRight,minimized,normal,"
320 to: "maximized,maximizedLeft,maximizedRight,minimized,normal,"
317 to: "maximized,maximizedLeft,maximizedRight,minimized,normal,"
321 enabled: appDelegate.animationsEnabled
318 enabled: appDelegate.animationsEnabled
319+ SequentialAnimation {
322− PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
320+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
321+ ScriptAction {
322+ script: {
323+ if (animationsEnabled && state === "minimized" ) {
324+ priv.focusNext();
325+ }
326+ }
327+ }
328+ }
323 },
329 },
324 Transition {
330 Transition {
325 from: ""
331 from: ""