From ce5c49f0e8b482105f1b7e46df4810854ae0578f Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Mon, 19 Mar 2018 11:37:01 +0200 Subject: [PATCH] Remove dead code from XEvent handler According to the X11 docs XSelectionNotify event is generated from a response to the ConvertSelection protocol which we don't use. --- src/x11/x.c | 4 ---- src/x11/x.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/x11/x.c b/src/x11/x.c index 6b48a16..1fdf58b 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -193,9 +193,6 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback, gpointer draw(); } break; - case SelectionNotify: - if (ev.xselection.property == xctx.utf8) - break; case ButtonRelease: if (ev.xbutton.window == xctx.win) { x_handle_click(ev); @@ -472,7 +469,6 @@ static void x_win_setup(void) XSetWindowAttributes wa; root = RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)); - xctx.utf8 = XInternAtom(xctx.dpy, "UTF8_STRING", false); wa.override_redirect = true; wa.background_pixmap = ParentRelative; diff --git a/src/x11/x.h b/src/x11/x.h index a2afde7..2eee3b5 100644 --- a/src/x11/x.h +++ b/src/x11/x.h @@ -34,14 +34,12 @@ struct dimensions { }; typedef struct _xctx { - Atom utf8; Display *dpy; int cur_screen; Window win; bool visible; const char *colors[3][3]; XScreenSaverInfo *screensaver_info; - unsigned long sep_custom_col; } xctx_t; typedef struct _color_t {