[Redbutton-devel] SF.net SVN: redbutton: [278] redbutton-browser/trunk/rb-keymap.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-04-03 15:13:35
|
Revision: 278
http://svn.sourceforge.net/redbutton/?rev=278&view=rev
Author: skilvington
Date: 2007-04-03 08:13:34 -0700 (Tue, 03 Apr 2007)
Log Message:
-----------
don't give up if we fail to grab the keyboard first time
Modified Paths:
--------------
redbutton-browser/trunk/rb-keymap.c
Modified: redbutton-browser/trunk/rb-keymap.c
===================================================================
--- redbutton-browser/trunk/rb-keymap.c 2007-04-03 14:20:12 UTC (rev 277)
+++ redbutton-browser/trunk/rb-keymap.c 2007-04-03 15:13:34 UTC (rev 278)
@@ -78,8 +78,14 @@
XMapWindow(dpy, win);
/* make sure the Window is Viewable before we call XGrabKeyboard */
XSync(dpy, False);
- if((rc = XGrabKeyboard(dpy, win, False, GrabModeAsync, GrabModeAsync, CurrentTime)) != 0)
- fatal("XGrabKeyboard failed: %d", rc);
+ printf("Trying to grab keyboard");
+ fflush(stdout);
+ while((rc = XGrabKeyboard(dpy, win, False, GrabModeAsync, GrabModeAsync, CurrentTime)) != 0)
+ {
+ printf(".");
+ fflush(stdout);
+ }
+ printf("\n");
for(i=0; keyname[i]; i++)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|