Changeset View
Changeset View
Standalone View
Standalone View
effects/fade/package/contents/code/main.js
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 59 | w.fadeOutWindowTypeAnimation = animate({ | |||
---|---|---|---|---|---|
62 | animations: [{ | 62 | animations: [{ | ||
63 | type: Effect.Opacity, | 63 | type: Effect.Opacity, | ||
64 | curve: QEasingCurve.OutQuart, | 64 | curve: QEasingCurve.OutQuart, | ||
65 | to: 0.0 | 65 | to: 0.0 | ||
66 | }] | 66 | }] | ||
67 | }); | 67 | }); | ||
68 | } | 68 | } | ||
69 | } | 69 | } | ||
70 | // TODO: Don't fade windows when switching between virtual desktops. | ||||
71 | // effects.windowShown.connect(fadeInHandler); | ||||
72 | // effects.windowHidden.connect(fadeOutHandler); | ||||
70 | effects.windowAdded.connect(fadeInHandler); | 73 | effects.windowAdded.connect(fadeInHandler); | ||
71 | effects.windowShown.connect(fadeInHandler); | | |||
72 | effects.windowClosed.connect(fadeOutHandler); | 74 | effects.windowClosed.connect(fadeOutHandler); | ||
73 | effects.windowHidden.connect(fadeOutHandler); | | |||
74 | effects.windowDataChanged.connect(function (window, role) { | 75 | effects.windowDataChanged.connect(function (window, role) { | ||
75 | if (role == Effect.WindowAddedGrabRole) { | 76 | if (role == Effect.WindowAddedGrabRole) { | ||
76 | if (effect.isGrabbed(window, Effect.WindowAddedGrabRole)) { | 77 | if (effect.isGrabbed(window, Effect.WindowAddedGrabRole)) { | ||
77 | if (window.fadeInWindowTypeAnimation !== undefined) { | 78 | if (window.fadeInWindowTypeAnimation !== undefined) { | ||
78 | cancel(window.fadeInWindowTypeAnimation); | 79 | cancel(window.fadeInWindowTypeAnimation); | ||
79 | window.fadeInWindowTypeAnimation = undefined; | 80 | window.fadeInWindowTypeAnimation = undefined; | ||
80 | } | 81 | } | ||
81 | } | 82 | } | ||
Show All 9 Lines |