@@ -195,22 +195,22 @@ Expo.prototype = {
195
195
// when it is next shown.
196
196
this . hide ( ) ;
197
197
198
- let primary = Main . layoutManager . primaryMonitor ;
198
+ let current = Main . layoutManager . currentMonitor ;
199
199
let rtl = ( St . Widget . get_default_direction ( ) == St . TextDirection . RTL ) ;
200
200
201
201
let contentY = 0 ;
202
- let contentHeight = primary . height ;
202
+ let contentHeight = current . height ;
203
203
204
- this . _group . set_position ( primary . x , primary . y ) ;
205
- this . _group . set_size ( primary . width , primary . height ) ;
204
+ this . _group . set_position ( current . x , current . y ) ;
205
+ this . _group . set_size ( current . width , current . height ) ;
206
206
207
207
this . _gradient . set_position ( 0 , 0 ) ;
208
- this . _gradient . set_size ( primary . width , primary . height ) ;
208
+ this . _gradient . set_size ( current . width , current . height ) ;
209
209
210
210
this . _coverPane . set_position ( 0 , 0 ) ;
211
- this . _coverPane . set_size ( primary . width , contentHeight ) ;
211
+ this . _coverPane . set_size ( current . width , contentHeight ) ;
212
212
213
- let viewWidth = primary . width - this . _spacing ;
213
+ let viewWidth = current . width - this . _spacing ;
214
214
let viewHeight = contentHeight - 2 * this . _spacing ;
215
215
let viewY = contentY + this . _spacing ;
216
216
let viewX = rtl ? 0 : this . _spacing ;
@@ -224,34 +224,34 @@ Expo.prototype = {
224
224
this . _windowCloseArea . width = node . get_length ( 'width' ) ;
225
225
226
226
this . _expo . actor . set_position ( 0 , 0 ) ;
227
- this . _expo . actor . set_size ( ( primary . width - buttonWidth ) , primary . height ) ;
227
+ this . _expo . actor . set_size ( ( current . width - buttonWidth ) , current . height ) ;
228
228
229
- let buttonY = ( primary . height - buttonHeight ) / 2 ;
229
+ let buttonY = ( current . height - buttonHeight ) / 2 ;
230
230
231
- this . _addWorkspaceButton . set_position ( ( primary . width - buttonWidth ) , buttonY ) ;
232
- this . _addWorkspaceButton . set_size ( buttonWidth , buttonHeight ) ;
231
+ this . _addWorkspaceButton . set_position ( ( current . width - buttonWidth ) , buttonY ) ;
232
+ this . _addWorkspaceButton . set_size ( buttonWidth , buttonHeight ) ;
233
233
if ( this . _addWorkspaceButton . get_theme_node ( ) . get_background_image ( ) == null )
234
- this . _addWorkspaceButton . set_style ( 'background-image: url("/usr/share/cinnamon/theme/add-workspace.png");' ) ;
234
+ this . _addWorkspaceButton . set_style ( 'background-image: url("/usr/share/cinnamon/theme/add-workspace.png");' ) ;
235
235
236
- this . _windowCloseArea . set_position ( ( primary . width - this . _windowCloseArea . width ) / 2 , primary . height ) ;
236
+ this . _windowCloseArea . set_position ( ( current . width - this . _windowCloseArea . width ) / 2 , current . height ) ;
237
237
this . _windowCloseArea . set_size ( this . _windowCloseArea . width , this . _windowCloseArea . height ) ;
238
238
this . _windowCloseArea . raise_top ( ) ;
239
239
} ,
240
240
241
241
_showCloseArea : function ( ) {
242
- let primary = Main . layoutManager . primaryMonitor ;
242
+ let current = Main . layoutManager . currentMonitor ;
243
243
this . _windowCloseArea . show ( ) ;
244
244
this . _windowCloseArea . ease ( {
245
- y : primary . height - this . _windowCloseArea . height ,
245
+ y : current . height - this . _windowCloseArea . height ,
246
246
duration : Main . animations_enabled ? ANIMATION_TIME : 0 ,
247
247
mode : Clutter . AnimationMode . EASE_OUT_QUAD
248
248
} ) ;
249
249
} ,
250
250
251
251
_hideCloseArea : function ( ) {
252
- let primary = Main . layoutManager . primaryMonitor ;
252
+ let current = Main . layoutManager . currentMonitor ;
253
253
this . _windowCloseArea . ease ( {
254
- y : primary . height ,
254
+ y : current . height ,
255
255
duration : Main . animations_enabled ? ANIMATION_TIME : 0 ,
256
256
mode : Clutter . AnimationMode . EASE_OUT_QUAD
257
257
} ) ;
@@ -319,15 +319,15 @@ Expo.prototype = {
319
319
Main . layoutManager . monitors . forEach ( function ( monitor , index ) {
320
320
let clone = clones [ index ] ;
321
321
clone . ease ( {
322
- x : Main . layoutManager . primaryMonitor . x + activeWorkspaceActor . allocation . x1 ,
323
- y : Main . layoutManager . primaryMonitor . y + activeWorkspaceActor . allocation . y1 ,
324
- scale_x : activeWorkspaceActor . get_scale ( ) [ 0 ] ,
325
- scale_y : activeWorkspaceActor . get_scale ( ) [ 1 ] ,
322
+ x : Main . layoutManager . currentMonitor . x + activeWorkspaceActor . allocation . x1 ,
323
+ y : Main . layoutManager . currentMonitor . y + activeWorkspaceActor . allocation . y1 ,
324
+ scale_x : activeWorkspaceActor . get_scale ( ) [ 0 ] ,
325
+ scale_y : activeWorkspaceActor . get_scale ( ) [ 1 ] ,
326
326
duration : Main . animations_enabled ? ANIMATION_TIME : 0 ,
327
327
mode : Clutter . AnimationMode . EASE_OUT_QUAD ,
328
328
onUpdate : ( t , timeIndex ) => {
329
- clone . get_transition ( "x" ) ?. set_to ( Main . layoutManager . primaryMonitor . x + activeWorkspaceActor . allocation . x1 ) ;
330
- clone . get_transition ( "y" ) ?. set_to ( Main . layoutManager . primaryMonitor . y + activeWorkspaceActor . allocation . y1 ) ;
329
+ clone . get_transition ( "x" ) ?. set_to ( Main . layoutManager . currentMonitor . x + activeWorkspaceActor . allocation . x1 ) ;
330
+ clone . get_transition ( "y" ) ?. set_to ( Main . layoutManager . currentMonitor . y + activeWorkspaceActor . allocation . y1 ) ;
331
331
clone . get_transition ( "scale-x" ) ?. set_to ( activeWorkspaceActor . get_scale ( ) [ 0 ] ) ;
332
332
clone . get_transition ( "scale-y" ) ?. set_to ( activeWorkspaceActor . get_scale ( ) [ 1 ] ) ;
333
333
} ,
@@ -436,7 +436,7 @@ Expo.prototype = {
436
436
437
437
let clone = new Clutter . Clone ( { source : activeWorkspaceActor } ) ;
438
438
cover . add_actor ( clone ) ;
439
- clone . set_position ( Main . layoutManager . primaryMonitor . x + activeWorkspaceActor . allocation . x1 , Main . layoutManager . primaryMonitor . y + activeWorkspaceActor . allocation . y1 ) ;
439
+ clone . set_position ( Main . layoutManager . currentMonitor . x + activeWorkspaceActor . allocation . x1 , Main . layoutManager . currentMonitor . y + activeWorkspaceActor . allocation . y1 ) ;
440
440
clone . set_clip ( monitor . x , monitor . y , monitor . width , monitor . height ) ;
441
441
clone . set_scale ( activeWorkspaceActor . get_scale ( ) [ 0 ] , activeWorkspaceActor . get_scale ( ) [ 1 ] ) ;
442
442
0 commit comments