Mercurial > aewl
comparison event.c @ 63:f14858218641
searching for a better way to discard enter notifies
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Fri, 14 Jul 2006 13:03:53 +0200 |
parents | 1269bd127551 |
children | e5fff8249705 |
comparison
equal
deleted
inserted
replaced
62:0a4b066ce254 | 63:f14858218641 |
---|---|
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; |