File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright © 2009 CNRS
3
- * Copyright © 2009-2016 Inria. All rights reserved.
3
+ * Copyright © 2009-2017 Inria. All rights reserved.
4
4
* Copyright © 2009-2010, 2014 Université Bordeaux
5
5
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
6
6
* See COPYING in top-level directory.
@@ -360,12 +360,15 @@ output_x11(struct lstopo_output *loutput)
360
360
float wscale , hscale ;
361
361
disp -> screen_width = e .xconfigure .width ;
362
362
disp -> screen_height = e .xconfigure .height ;
363
- wscale = disp -> screen_width / (float )disp -> width ;
364
- hscale = disp -> screen_height / (float )disp -> height ;
365
- disp -> scale *= wscale > hscale ? hscale : wscale ;
366
- if (disp -> scale < 1.0f )
367
- disp -> scale = 1.0f ;
368
- move_x11 (disp );
363
+ if (disp -> screen_width != disp -> last_screen_width
364
+ || disp -> screen_height != disp -> last_screen_height ) {
365
+ wscale = disp -> screen_width / (float )disp -> width ;
366
+ hscale = disp -> screen_height / (float )disp -> height ;
367
+ disp -> scale *= wscale > hscale ? hscale : wscale ;
368
+ if (disp -> scale < 1.0f )
369
+ disp -> scale = 1.0f ;
370
+ move_x11 (disp );
371
+ }
369
372
if (disp -> x != lastx || disp -> y != lasty )
370
373
XMoveWindow (disp -> dpy , disp -> win , - disp -> x , - disp -> y );
371
374
break ;
You can’t perform that action at this time.
0 commit comments