summaryrefslogtreecommitdiff
path: root/glws_cocoa.mm
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-10-26 18:43:21 +0100
committerJosé Fonseca <jfonseca@vmware.com>2011-10-26 18:43:21 +0100
commit79ae5703b55b13194e1dc50db7f5813d107e8806 (patch)
treeb2cf5d8c7c08288ce20bc2ab321fdad35578fca7 /glws_cocoa.mm
parent212718d6191b4a43c710a7979e566dbbb4123585 (diff)
Cleanup X11 event handling.
Fixes an infinite loop on GlxDrawable::show() in certain traces.
Diffstat (limited to 'glws_cocoa.mm')
-rw-r--r--glws_cocoa.mm15
1 files changed, 11 insertions, 4 deletions
diff --git a/glws_cocoa.mm b/glws_cocoa.mm
index a35dcf5..493cb4a 100644
--- a/glws_cocoa.mm
+++ b/glws_cocoa.mm
@@ -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) {