]> git.cworth.org Git - apitrace/blobdiff - glws_cocoa.mm
Cleanup X11 event handling.
[apitrace] / glws_cocoa.mm
index a35dcf506370d0d8215305572897b9576f8694ee..493cb4a58dc54b1c3af3e0a9da4243298d2b70a2 100644 (file)
@@ -104,7 +104,9 @@ public:
 
     void
     resize(int w, int h) {
-        Drawable::resize(w, h);
+        if (w == width && h == height) {
+            return;
+        }
 
         [window setContentSize:NSMakeSize(w, h)];
 
@@ -114,13 +116,18 @@ public:
             [currentContext setView:[window contentView]];
             [currentContext makeCurrentContext];
         }
+
+        Drawable::resize(w, h);
     }
 
     void show(void) {
-        if (!visible) {
-            // TODO
-            Drawable::show();
+        if (visible) {
+            return;
         }
+
+        // TODO
+
+        Drawable::show();
     }
 
     void swapBuffers(void) {