keybindings: Simplify

This commit is contained in:
Jasper St. Pierre 2014-04-24 10:57:20 -04:00
parent 2c53919462
commit c8e3b52160

View File

@ -1355,28 +1355,6 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
return TRUE; return TRUE;
} }
#ifdef WITH_VERBOSE_MODE
static const char*
grab_status_to_string (int status)
{
switch (status)
{
case AlreadyGrabbed:
return "AlreadyGrabbed";
case GrabSuccess:
return "GrabSuccess";
case GrabNotViewable:
return "GrabNotViewable";
case GrabFrozen:
return "GrabFrozen";
case GrabInvalidTime:
return "GrabInvalidTime";
default:
return "(unknown)";
}
}
#endif /* WITH_VERBOSE_MODE */
static gboolean static gboolean
grab_keyboard (MetaDisplay *display, grab_keyboard (MetaDisplay *display,
Window xwindow, Window xwindow,
@ -1416,18 +1394,7 @@ grab_keyboard (MetaDisplay *display,
False, /* owner_events */ False, /* owner_events */
&mask); &mask);
if (grab_status != Success) return (grab_status == Success);
{
meta_topic (META_DEBUG_KEYBINDINGS,
"XIGrabDevice() returned failure status %s time %u\n",
grab_status_to_string (grab_status),
timestamp);
return FALSE;
}
meta_topic (META_DEBUG_KEYBINDINGS, "Grabbed all keys\n");
return TRUE;
} }
static void static void