mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
keybindings: Remove now-unused meta_screen_grab_all_keys
This commit is contained in:
parent
1d5b4e5b2f
commit
41235fcb86
@ -94,10 +94,6 @@ void meta_display_init_keys (MetaDisplay *display);
|
||||
void meta_display_shutdown_keys (MetaDisplay *display);
|
||||
void meta_screen_grab_keys (MetaScreen *screen);
|
||||
void meta_screen_ungrab_keys (MetaScreen *screen);
|
||||
gboolean meta_screen_grab_all_keys (MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
void meta_window_grab_keys (MetaWindow *window);
|
||||
void meta_window_ungrab_keys (MetaWindow *window);
|
||||
gboolean meta_window_grab_all_keys (MetaWindow *window,
|
||||
|
@ -1159,9 +1159,6 @@ meta_screen_grab_keys (MetaScreen *screen)
|
||||
if (!META_IS_BACKEND_X11 (backend))
|
||||
return;
|
||||
|
||||
if (screen->all_keys_grabbed)
|
||||
return;
|
||||
|
||||
if (screen->keys_grabbed)
|
||||
return;
|
||||
|
||||
@ -1406,51 +1403,6 @@ ungrab_keyboard (MetaDisplay *display, guint32 timestamp)
|
||||
XIUngrabDevice (xdisplay, META_VIRTUAL_CORE_KEYBOARD_ID, timestamp);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp)
|
||||
{
|
||||
gboolean retval;
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
|
||||
if (!META_IS_BACKEND_X11 (backend))
|
||||
return TRUE;
|
||||
|
||||
if (screen->all_keys_grabbed)
|
||||
return FALSE;
|
||||
|
||||
if (screen->keys_grabbed)
|
||||
meta_screen_ungrab_keys (screen);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Grabbing all keys on RootWindow\n");
|
||||
retval = grab_keyboard (screen->display, screen->xroot, timestamp, XIGrabModeAsync);
|
||||
if (retval)
|
||||
{
|
||||
screen->all_keys_grabbed = TRUE;
|
||||
g_object_notify (G_OBJECT (screen), "keyboard-grabbed");
|
||||
}
|
||||
else
|
||||
meta_screen_grab_keys (screen);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp)
|
||||
{
|
||||
if (screen->all_keys_grabbed)
|
||||
{
|
||||
ungrab_keyboard (screen->display, timestamp);
|
||||
|
||||
screen->all_keys_grabbed = FALSE;
|
||||
screen->keys_grabbed = FALSE;
|
||||
|
||||
/* Re-establish our standard bindings */
|
||||
meta_screen_grab_keys (screen);
|
||||
g_object_notify (G_OBJECT (screen), "keyboard-grabbed");
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_window_grab_all_keys (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
@ -1803,7 +1755,7 @@ meta_display_process_key_event (MetaDisplay *display,
|
||||
|
||||
screen = display->screen;
|
||||
|
||||
all_keys_grabbed = window ? window->all_keys_grabbed : screen->all_keys_grabbed;
|
||||
all_keys_grabbed = window ? window->all_keys_grabbed : FALSE;
|
||||
if (!all_keys_grabbed)
|
||||
{
|
||||
handled = process_overlay_key (display, screen, event, window);
|
||||
|
@ -112,7 +112,6 @@ struct _MetaScreen
|
||||
guint workspace_layout_overridden : 1;
|
||||
|
||||
guint keys_grabbed : 1;
|
||||
guint all_keys_grabbed : 1;
|
||||
|
||||
int closing;
|
||||
|
||||
|
@ -78,7 +78,6 @@ static void on_monitors_changed (MetaMonitorManager *manager,
|
||||
enum
|
||||
{
|
||||
PROP_N_WORKSPACES = 1,
|
||||
PROP_KEYBOARD_GRABBED,
|
||||
};
|
||||
|
||||
enum
|
||||
@ -132,9 +131,6 @@ meta_screen_get_property (GObject *object,
|
||||
case PROP_N_WORKSPACES:
|
||||
g_value_set_int (value, meta_screen_get_n_workspaces (screen));
|
||||
break;
|
||||
case PROP_KEYBOARD_GRABBED:
|
||||
g_value_set_boolean (value, screen->all_keys_grabbed ? TRUE : FALSE);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -258,16 +254,6 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_N_WORKSPACES,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_boolean ("keyboard-grabbed",
|
||||
"Keyboard grabbed",
|
||||
"Whether the keyboard is grabbed",
|
||||
FALSE,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_KEYBOARD_GRABBED,
|
||||
pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -752,7 +738,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
|
||||
set_workspace_names (screen);
|
||||
|
||||
screen->all_keys_grabbed = FALSE;
|
||||
screen->keys_grabbed = FALSE;
|
||||
meta_screen_grab_keys (screen);
|
||||
|
||||
|
@ -32,7 +32,4 @@ gboolean meta_keybindings_set_custom_handler (const gchar *name,
|
||||
MetaKeyHandlerFunc handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify free_data);
|
||||
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp);
|
||||
gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user