Changeset View
Changeset View
Standalone View
Standalone View
effects/maximize/package/contents/code/maximize.js
Show All 13 Lines | |||||
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. | ||
15 | 15 | | |||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | *********************************************************************/ | 18 | *********************************************************************/ | ||
19 | /*global effect, effects, animate, animationTime, Effect*/ | 19 | /*global effect, effects, animate, animationTime, Effect*/ | ||
20 | var maximizeEffect = { | 20 | var maximizeEffect = { | ||
21 | duration: animationTime(250), | 21 | duration: animationTime(250), | ||
22 | windowForceBlurRoleState: false, | | |||
23 | loadConfig: function () { | 22 | loadConfig: function () { | ||
24 | "use strict"; | 23 | "use strict"; | ||
25 | maximizeEffect.duration = animationTime(250); | 24 | maximizeEffect.duration = animationTime(250); | ||
26 | }, | 25 | }, | ||
27 | maximizeChanged: function (window) { | 26 | maximizeChanged: function (window) { | ||
28 | "use strict"; | 27 | "use strict"; | ||
29 | if (!window.oldGeometry) { | 28 | if (!window.oldGeometry) { | ||
30 | return; | 29 | return; | ||
31 | } | 30 | } | ||
32 | maximizeEffect.windowForceBlurRoleState = window.data(Effect.WindowForceBlurRole); | | |||
33 | window.setData(Effect.WindowForceBlurRole, true); | 31 | window.setData(Effect.WindowForceBlurRole, true); | ||
34 | var oldGeometry, newGeometry; | 32 | var oldGeometry, newGeometry; | ||
35 | oldGeometry = window.oldGeometry; | 33 | oldGeometry = window.oldGeometry; | ||
36 | newGeometry = window.geometry; | 34 | newGeometry = window.geometry; | ||
37 | if (oldGeometry.width == newGeometry.width && oldGeometry.height == newGeometry.height) | 35 | if (oldGeometry.width == newGeometry.width && oldGeometry.height == newGeometry.height) | ||
38 | oldGeometry = window.olderGeometry; | 36 | oldGeometry = window.olderGeometry; | ||
39 | window.olderGeometry = window.oldGeometry; | 37 | window.olderGeometry = window.oldGeometry; | ||
40 | window.oldGeometry = newGeometry; | 38 | window.oldGeometry = newGeometry; | ||
Show All 30 Lines | 68 | animations: [{ | |||
71 | type: Effect.CrossFadePrevious, | 69 | type: Effect.CrossFadePrevious, | ||
72 | to: 1.0, | 70 | to: 1.0, | ||
73 | from: 0.0 | 71 | from: 0.0 | ||
74 | }] | 72 | }] | ||
75 | }); | 73 | }); | ||
76 | } | 74 | } | ||
77 | }, | 75 | }, | ||
78 | restoreForceBlurState: function(window) { | 76 | restoreForceBlurState: function(window) { | ||
79 | window.setData(Effect.WindowForceBlurRole, maximizeEffect.windowForceBlurRoleState); | 77 | window.setData(Effect.WindowForceBlurRole, null); | ||
80 | }, | 78 | }, | ||
81 | geometryChange: function (window, oldGeometry) { | 79 | geometryChange: function (window, oldGeometry) { | ||
82 | "use strict"; | 80 | "use strict"; | ||
83 | if (window.maximizeAnimation1) { | 81 | if (window.maximizeAnimation1) { | ||
84 | if (window.geometry.width != window.oldGeometry.width || | 82 | if (window.geometry.width != window.oldGeometry.width || | ||
85 | window.geometry.height != window.oldGeometry.height) { | 83 | window.geometry.height != window.oldGeometry.height) { | ||
86 | cancel(window.maximizeAnimation1); | 84 | cancel(window.maximizeAnimation1); | ||
87 | delete window.maximizeAnimation1; | 85 | delete window.maximizeAnimation1; | ||
Show All 18 Lines |