William Skaggs ([EMAIL PROTECTED]) wrote:
> Jean-Luc Coulon wrote:
> > The plugin crash with a popup :
> > Plud-in crashed: "screenshot"
>
> I get the same result. Looking at the man pages, this apparently happens
> if the key being grabbed has already been grabbed by something else --
> but there does not seem to be any way to tell whether a given key
> has already been grabbed. Which kind of sucks.
If XGrabKey might fail you can wrap it similiar to this:
gdk_error_trap_push ();
XGrabKey (GDK_DISPLAY_XDISPLAY (data->display),
data->hot_keycode,
AnyModifier,
GDK_WINDOW_XWINDOW (data->root),
TRUE,
GrabModeAsync,
GrabModeAsync);
gdk_flush ();
if (gdk_error_trap_pop ())
{
g_printerr ("could not grab Hotkey. Aborting...\n");
exit (1);
}
Bye,
Simon
--
[EMAIL PROTECTED] http://simon.budig.de/
_______________________________________________
Gimp-developer mailing list
[email protected]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer