Browse Source

useless feature

Eduardo Bart 10 years ago
parent
commit
33a2b885b5
1 changed files with 17 additions and 10 deletions
  1. 17
    10
      src/framework/x11platform.cpp

+ 17
- 10
src/framework/x11platform.cpp View File

@@ -297,20 +297,27 @@ void Platform::poll()
297 297
         switch(event.type) {
298 298
             case ConfigureNotify:
299 299
                 // window resize
300
-                if(x11.width != event.xconfigure.width || x11.height != event.xconfigure.height) {
300
+                static int oldWidth = -1;
301
+                static int oldHeight = -1;
302
+                if(oldWidth != event.xconfigure.width || oldHeight != event.xconfigure.height) {
303
+                    g_engine.onResize(event.xconfigure.width, event.xconfigure.height);
304
+                    oldWidth = event.xconfigure.width;
305
+                    oldHeight = event.xconfigure.height;
306
+                }
307
+
308
+                if(!isWindowMaximized()) {
301 309
                     x11.width = event.xconfigure.width;
302 310
                     x11.height = event.xconfigure.height;
303
-                    g_engine.onResize(x11.width, x11.height);
304
-                }
305 311
 
306
-                // hack to fix x11 windows move gaps
307
-                static int gap_x = -1, gap_y = -1;
308
-                if(gap_x == -1 && gap_y == -1) {
309
-                    gap_x = event.xconfigure.x;
310
-                    gap_y = event.xconfigure.y;
312
+                    // hack to fix x11 windows move gaps
313
+                    static int gap_x = -1, gap_y = -1;
314
+                    if(gap_x == -1 && gap_y == -1) {
315
+                        gap_x = event.xconfigure.x;
316
+                        gap_y = event.xconfigure.y;
317
+                    }
318
+                    x11.x = event.xconfigure.x - gap_x;
319
+                    x11.y = event.xconfigure.y - gap_y;
311 320
                 }
312
-                x11.x = event.xconfigure.x - gap_x;
313
-                x11.y = event.xconfigure.y - gap_y;
314 321
                 break;
315 322
 
316 323
             case KeyPress:

Loading…
Cancel
Save