[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] xgrabkeyboard race/fail patch
From: |
Shawn Betts |
Subject: |
Re: [RP] xgrabkeyboard race/fail patch |
Date: |
Sun Nov 23 12:58:05 2003 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
twb <address@hidden> writes:
> +#define XGRABKEYBOARD_LOOP_DEPTH 10
> +#define XGRABKEYBOARD_UDELAY 10000
> +#define rp_xgrabkeyboard(display, grab_window, owner_events, pointer_mode,
> keyboard_mode, time) \
> + int XGrabKeyboardError=0; \
> + int XGrabKeyboardLoop=0; \
> + while (XGrabKeyboardError = XGrabKeyboard (display, grab_window,
> owner_events, pointer_mode, keyboard_mode, time) \
> + && XGrabKeyboardLoop < XGRABKEYBOARD_LOOP_DEPTH) { \
> + PRINT_DEBUG(("Couldn't grab the keyboard! Retry in 0.01
> seconds.\n")); \
> + ++XGrabKeyboardLoop; \
> + usleep(XGRABKEYBOARD_UDELAY); \
> + } \
> + if (XGrabKeyboardError)
> +
> +
Why is rp_xgrabkeyboard a macro? Why not a function?
Shawn