Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 138986 Details for
Bug 202389
x11-wm/ratpoison interactive ( C-T: ) boxes disable keyboard
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test case
xorg-grab.c (text/plain), 1.26 KB, created by
Ewgenij Starostin
on 2007-12-20 17:41:29 UTC
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Ewgenij Starostin
Created:
2007-12-20 17:41:29 UTC
Size:
1.26 KB
patch
obsolete
>/* (Fairly) minimal test case for bug 202389 > * https://bugs.gentoo.org/202389 > */ >#include <X11/Xlib.h> >#include <X11/Xutil.h> >#include <stdio.h> >#include <unistd.h> > >Display *dpy; >Window wnd; > >#define print(...) (printf(__VA_ARGS__) >= 0 && fflush(stdin)) >#define DELAY 5 /* seconds */ >#define stop() ((print("Type something now.\n") || 1) && \ > sleep(DELAY) >= 0) >int grab(); >int ungrab(); > >int main(int argc, char *argv[]) >{ > int black; > > print("Bug 202389 test starts.\n"); > dpy = XOpenDisplay(0); > black = BlackPixel(dpy, DefaultScreen(dpy)); > wnd = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), > 0, 0, 1, 1, 0, black, black); > XMapWindow(dpy, wnd); > XRaiseWindow(dpy, wnd); > XClearWindow(dpy, wnd); > XSync(dpy, False); > if(grab() && stop() && ungrab()) > print("No errors.\n"); > else > print("\t...Error.\n"); > print("Test ends.\n"); > return 0; >} > >int grab() >{ > int ret; > > print("Grabbing keyboard"); > ret = XGrabKeyboard(dpy, wnd, False, GrabModeSync, > GrabModeAsync, CurrentTime); > print(" (returned %d)\n", ret); > XSync(dpy, False); > return ret == GrabSuccess; >} > >int ungrab() >{ > print("Ungrabbing keyboard. If no lines follow this one," > "test failure.\n"); > sleep(2); /* to see the output â maybe */ > XUngrabKeyboard(dpy, CurrentTime); > XSync(dpy, False); > return 1; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 202389
: 138986