diff options
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/detail/win.h | 4 | ||||
-rw-r--r-- | pugl/detail/x11.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pugl/detail/win.h b/pugl/detail/win.h index 4219a36..283f39e 100644 --- a/pugl/detail/win.h +++ b/pugl/detail/win.h @@ -49,7 +49,7 @@ puglWinGetPixelFormatDescriptor(const PuglHints hints) hints[PUGL_GREEN_BITS] + // hints[PUGL_BLUE_BITS]); - const DWORD dwFlags = hints[PUGL_DOUBLE_BUFFER] ? PFD_DOUBLEBUFFER : 0; + const DWORD dwFlags = hints[PUGL_DOUBLE_BUFFER] ? PFD_DOUBLEBUFFER : 0u; PuglWinPFD pfd; ZeroMemory(&pfd, sizeof(pfd)); @@ -72,7 +72,7 @@ static inline unsigned puglWinGetWindowFlags(const PuglView* const view) { const bool resizable = view->hints[PUGL_RESIZABLE]; - const unsigned sizeFlags = resizable ? (WS_SIZEBOX | WS_MAXIMIZEBOX) : 0; + const unsigned sizeFlags = resizable ? (WS_SIZEBOX | WS_MAXIMIZEBOX) : 0u; return (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | (view->parent diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c index 8dc27e7..cc77f29 100644 --- a/pugl/detail/x11.c +++ b/pugl/detail/x11.c @@ -798,15 +798,15 @@ puglPostRedisplayRect(PuglView* view, PuglRect rect) mergeExposeEvents(&view->impl->pendingExpose, (const PuglEvent*)&event); } else if (view->visible) { // Not dispatching events, send an X expose so we wake up next time - 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; + const double x = floor(rect.x); + const double y = floor(rect.y); + const double w = ceil(rect.x + rect.width) - x; + const double h = ceil(rect.y + rect.height) - y; XExposeEvent ev = {Expose, 0, True, view->impl->display, view->impl->win, - x, y, - w, h, + (int)x, (int)y, + (int)w, (int)h, 0}; XSendEvent(view->impl->display, view->impl->win, False, 0, (XEvent*)&ev); |