summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-24 10:30:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-24 12:30:35 +1000
commit1c28ba44958389892470688ce394c034dc8efa21 (patch)
treeae1552c778ad2a1851129641bb32d1476fe92022 /src
parentf00f6b1c58b3ded52d8cb0002e0bacd558bc874c (diff)
test_xi2: don't map the window before selecting for events.
Mapping the window before selecting for XI2 events leaves some events out (e.g. enter events if the pointer is already in the area where the window is being mapped). Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/test_xi2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test_xi2.c b/src/test_xi2.c
index 5600291..2201692 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -36,10 +36,8 @@ static Window create_win(Display *dpy)
Window subwindow = XCreateSimpleWindow(dpy, win, 50, 50, 50, 50, 0, 0,
BlackPixel(dpy, 0));
- XSelectInput(dpy, win, ExposureMask);
XMapWindow(dpy, subwindow);
- XMapWindow(dpy, win);
- XFlush(dpy);
+ XSelectInput(dpy, win, ExposureMask);
return win;
}
@@ -268,8 +266,6 @@ test_xi2(Display *display,
list(display, argc, argv, name, desc);
win = create_win(display);
- XSync(display, False);
-
/* Select for motion events */
mask.deviceid = XIAllDevices;
mask.mask_len = 2;
@@ -287,6 +283,7 @@ test_xi2(Display *display,
XISetMask(mask.mask, XI_HierarchyChanged);
XISetMask(mask.mask, XI_PropertyEvent);
XISelectEvents(display, win, &mask, 1);
+ XMapWindow(display, win);
XSync(display, False);
{