aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorZoƫ Sparks <zoe@milky.flowers>2020-02-09 18:35:53 -0500
committerDavid Robillard <d@drobilla.net>2020-02-11 19:27:51 +0100
commit3ab23845ca924bfe7ed137c9fa84cb815256dc48 (patch)
treeb2a4f76bf13c3678fd53b21c53999647817f78f0 /pugl
parent4fbcb7d243335346cfb1cc3b16addd9078193339 (diff)
downloadpugl-3ab23845ca924bfe7ed137c9fa84cb815256dc48.tar.gz
pugl-3ab23845ca924bfe7ed137c9fa84cb815256dc48.tar.bz2
pugl-3ab23845ca924bfe7ed137c9fa84cb815256dc48.zip
X11: Fix XMoveResizeWindow error check
In Xlib, a return value of 0 indicates an error (see "Xlib - C Language X Interface", Ch. 1, "Errors"). XMoveResizeWindow accordingly returns 1 on success, but the error check in puglSetFrame used the usual C convention, and so was backwards.
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/x11.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 4099553..2b1090e 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -872,9 +872,9 @@ puglSetFrame(PuglView* view, const PuglRect frame)
view->frame = frame;
if (view->impl->win &&
- XMoveResizeWindow(view->world->impl->display, view->impl->win,
- (int)frame.x, (int)frame.y,
- (int)frame.width, (int)frame.height)) {
+ !XMoveResizeWindow(view->world->impl->display, view->impl->win,
+ (int)frame.x, (int)frame.y,
+ (int)frame.width, (int)frame.height)) {
return PUGL_UNKNOWN_ERROR;
}