From 524bccedb6d65a5d8a5e7e420bf9dfc1f3367d3c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 15 Mar 2020 14:33:13 +0100 Subject: X11: Simplify implementation slightly These continue statements are not necessary since the events will not be translated anyway. --- pugl/detail/x11.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c index 4747f64..b505c50 100644 --- a/pugl/detail/x11.c +++ b/pugl/detail/x11.c @@ -188,8 +188,6 @@ puglCreateWindow(PuglView* view, const char* title) PuglWorld* const world = view->world; PuglX11Atoms* const atoms = &view->world->impl->atoms; Display* const display = world->impl->display; - const unsigned width = (unsigned)view->frame.width; - const unsigned height = (unsigned)view->frame.height; impl->display = display; impl->screen = DefaultScreen(display); @@ -216,7 +214,8 @@ puglCreateWindow(PuglView* view, const char* title) const Window win = impl->win = XCreateWindow( display, xParent, - (int)view->frame.x, (int)view->frame.y, width, height, + (int)view->frame.x, (int)view->frame.y, + (unsigned)view->frame.width, (unsigned)view->frame.height, 0, impl->vi->depth, InputOutput, impl->vi->visual, CWColormap | CWEventMask, &attr); @@ -776,16 +775,13 @@ puglDispatchEvents(PuglWorld* world) XUnsetICFocus(impl->xic); } else if (xevent.type == SelectionClear) { puglSetBlob(&view->clipboard, NULL, 0); - continue; } else if (xevent.type == SelectionNotify && xevent.xselection.selection == atoms->CLIPBOARD && xevent.xselection.target == atoms->UTF8_STRING && xevent.xselection.property == XA_PRIMARY) { handleSelectionNotify(world, view); - continue; } else if (xevent.type == SelectionRequest) { handleSelectionRequest(world, view, &xevent.xselectionrequest); - continue; } // Translate X11 event to Pugl event -- cgit v1.2.1