diff options
Diffstat (limited to 'pugl/detail/x11.c')
-rw-r--r-- | pugl/detail/x11.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c index c82a2e5..bbf4307 100644 --- a/pugl/detail/x11.c +++ b/pugl/detail/x11.c @@ -811,18 +811,18 @@ puglPostRedisplay(PuglView* view) PuglStatus puglPostRedisplayRect(PuglView* view, PuglRect rect) { - const int x = (int)floor(rect.x); - const int y = (int)floor(rect.y); - const int w = (int)ceil(rect.x + rect.width) - x; - const int h = (int)ceil(rect.y + rect.height) - y; + if (view->visible) { + const int x = (int)floor(rect.x); + const int y = (int)floor(rect.y); + const int w = (int)ceil(rect.x + rect.width) - x; + const int h = (int)ceil(rect.y + rect.height) - y; - XExposeEvent ev = {Expose, 0, True, - view->impl->display, view->impl->win, - x, y, - w, h, - 0}; + XExposeEvent ev = {Expose, 0, True, + view->impl->display, view->impl->win, + x, y, + w, h, + 0}; - if (view->visible) { XSendEvent(view->impl->display, view->impl->win, False, 0, (XEvent*)&ev); } |