From 9c2eceb55b3c62d592808fa8db1559a04b9a9025 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Thu, 31 Oct 2019 12:52:58 -0400 Subject: [PATCH] fixed the keyboard disconnect bug for real this time. MapNotify and MappingNotify are NOT the same thing as it turns out... --- src/lib/x11_gc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/x11_gc.c b/src/lib/x11_gc.c index 4fdb37a..baf8029 100644 --- a/src/lib/x11_gc.c +++ b/src/lib/x11_gc.c @@ -27,9 +27,6 @@ void x11_resize(XConf* x, XEvent* e) void x11_mapnotify(XConf* x, XEvent* e) { telem_send("XMAPNOTIFY(0x%x)\n", e->xmap.window); - XFreePixmap(x->display, x->pixmap); - x->pixmap = XCreatePixmap(x->display, x->self, x->width, x->height, x->depth); - XftDrawChange(x->xft, x->pixmap); XWarpPointer(x->display, None, x->self, 0, 0, x->width, x->height, x->width/2, x->height/2); } @@ -49,7 +46,7 @@ void x11_init_gc(XConf* x) x->eventfns[FocusIn] = xfocus; x->eventfns[FocusOut] = xfocus; x->eventfns[ConfigureNotify] = x11_resize; - x->eventfns[MappingNotify] = x11_mapnotify; + x->eventfns[MapNotify] = x11_mapnotify; } void x11_centerwin(XConf* x) -- 2.54.0