equal
deleted
inserted
replaced
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
3 * See LICENSE file for license details. |
3 * See LICENSE file for license details. |
4 */ |
4 */ |
5 |
5 |
6 #include <fcntl.h> |
6 #include <fcntl.h> |
|
7 #include <stdio.h> |
7 #include <stdlib.h> |
8 #include <stdlib.h> |
8 #include <string.h> |
9 #include <string.h> |
9 #include <X11/keysym.h> |
10 #include <X11/keysym.h> |
10 #include <X11/Xatom.h> |
11 #include <X11/Xatom.h> |
11 |
12 |
34 [KeymapNotify] = keymapnotify, |
35 [KeymapNotify] = keymapnotify, |
35 [MapRequest] = maprequest, |
36 [MapRequest] = maprequest, |
36 [PropertyNotify] = propertynotify, |
37 [PropertyNotify] = propertynotify, |
37 [UnmapNotify] = unmapnotify |
38 [UnmapNotify] = unmapnotify |
38 }; |
39 }; |
39 |
|
40 void |
|
41 discard_events(long even_mask) |
|
42 { |
|
43 XEvent ev; |
|
44 while(XCheckMaskEvent(dpy, even_mask, &ev)); |
|
45 } |
|
46 |
40 |
47 static void |
41 static void |
48 buttonpress(XEvent *e) |
42 buttonpress(XEvent *e) |
49 { |
43 { |
50 XButtonPressedEvent *ev = &e->xbutton; |
44 XButtonPressedEvent *ev = &e->xbutton; |