File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -237,16 +237,18 @@ export const PanelBlur = class PanelBlur {
237
237
// sometimes yields NaN (probably when the actor is not fully
238
238
// positionned yet)
239
239
let [ p_x , p_y ] = panel_box . get_position ( ) ;
240
- let x = p_x + ( width - panel . width ) / 2 ;
241
- let y = p_y + ( height - panel . height ) / 2 ;
240
+ let [ p_p_x , p_p_y ] = panel_box . get_parent ( ) . get_position ( ) ;
241
+ let x = p_x + p_p_x - monitor . x + ( width - panel . width ) / 2 ;
242
+ let y = p_y + p_p_y - monitor . y + ( height - panel . height ) / 2 ;
243
+
242
244
background . set_clip ( x , y , panel . width , panel . height ) ;
243
245
background . x = ( width - panel . width ) / 2 - x ;
244
246
background . y = ( height - panel . height ) / 2 - y ;
245
247
} else {
246
- background . x = panel_box . x ;
247
- background . y = panel_box . y ;
248
- background . width = width ;
249
- background . height = height ;
248
+ background . x = panel . x ;
249
+ background . y = panel . y ;
250
+ background . width = panel . width ;
251
+ background . height = panel . height ;
250
252
}
251
253
252
254
// update the monitor panel is on
You can’t perform that action at this time.
0 commit comments