From 3ab23845ca924bfe7ed137c9fa84cb815256dc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB=20Sparks?= Date: Sun, 9 Feb 2020 18:35:53 -0500 Subject: 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. --- pugl/detail/x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pugl') 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; } -- cgit v1.2.1