diff options
author | David Robillard <d@drobilla.net> | 2020-03-15 14:33:13 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-15 14:33:13 +0100 |
commit | 524bccedb6d65a5d8a5e7e420bf9dfc1f3367d3c (patch) | |
tree | 004768c5c5fd12ee572d137638a8e4bb6be7ed3e | |
parent | 4693e9ac0b6792e8a6d2af2e46499158bf6b2509 (diff) |
X11: Simplify implementation slightly
These continue statements are not necessary since the events will not be
translated anyway.
-rw-r--r-- | pugl/detail/x11.c | 8 |
1 files 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 |