marco 1.29.1
Window manager
Loading...
Searching...
No Matches
keybindings.c File Reference
View source
#include <config.h>
#include <glib/gi18n-lib.h>
#include "keybindings.h"
#include "workspace.h"
#include "errors.h"
#include "edge-resistance.h"
#include "ui.h"
#include "frame-private.h"
#include "place.h"
#include "prefs.h"
#include "effects.h"
#include "util.h"
#include <gio/gio.h>
#include <X11/keysym.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "all-keybindings.h"
Include dependency graph for keybindings.c:

Data Structures

struct  MetaKeyHandler
 
struct  _MetaKeyBinding
 

Macros

#define _GNU_SOURCE
 
#define _XOPEN_SOURCE   /* for putenv() */
 
#define keybind(name, handler, param, flags)
 
#define keybind(name, handler, param, flags)    { #name, handler, param, flags },
 
#define SMALL_INCREMENT   1
 
#define NORMAL_INCREMENT   10
 
#define SMALL_INCREMENT   1
 
#define NORMAL_INCREMENT   10
 
#define RENAME_WORKSPACE_BUFSIZE   512
 

Typedefs

typedef void(* MetaKeyHandlerFunc) (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 

Functions

static void handle_workspace_switch_or_move (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding, gboolean is_move)
 
static gboolean process_mouse_move_resize_grab (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, KeySym keysym)
 
static gboolean process_keyboard_move_grab (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, KeySym keysym)
 
static gboolean process_keyboard_resize_grab (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, KeySym keysym)
 
static gboolean process_tab_grab (MetaDisplay *display, MetaScreen *screen, XEvent *event, KeySym keysym)
 
static gboolean process_workspace_switch_grab (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, KeySym keysym)
 
static void regrab_key_bindings (MetaDisplay *display)
 
static void reload_keymap (MetaDisplay *display)
 
static void reload_modmap (MetaDisplay *display)
 
static void reload_keycodes (MetaDisplay *display)
 
static void reload_modifiers (MetaDisplay *display)
 
static int count_bindings (const MetaKeyPref *prefs, int n_prefs)
 
static const MetaKeyHandler * find_handler (const MetaKeyHandler *handlers, const char *name)
 
static void rebuild_binding_table (MetaDisplay *display, MetaKeyBinding **bindings_p, int *n_bindings_p, const MetaKeyPref *prefs, int n_prefs)
 
static void rebuild_key_binding_table (MetaDisplay *display)
 
static MetaKeyBindingAction display_get_keybinding_action (MetaDisplay *display, unsigned int keysym, unsigned int keycode, unsigned long mask)
 
void meta_display_process_mapping_event (MetaDisplay *display, XEvent *event)
 
static void bindings_changed_callback (MetaPreference pref, void *data)
 
void meta_display_init_keys (MetaDisplay *display)
 
void meta_display_shutdown_keys (MetaDisplay *display)
 
static const char * keysym_name (int keysym)
 
static void meta_change_keygrab (MetaDisplay *display, Window xwindow, gboolean grab, int keysym, unsigned int keycode, int modmask)
 
static void meta_grab_key (MetaDisplay *display, Window xwindow, int keysym, unsigned int keycode, int modmask)
 
static void grab_keys (MetaKeyBinding *bindings, int n_bindings, MetaDisplay *display, Window xwindow, gboolean binding_per_window)
 
static void ungrab_all_keys (MetaDisplay *display, Window xwindow)
 
void meta_screen_grab_keys (MetaScreen *screen)
 
void meta_screen_ungrab_keys (MetaScreen *screen)
 
void meta_window_grab_keys (MetaWindow *window)
 
void meta_window_ungrab_keys (MetaWindow *window)
 
static gboolean grab_keyboard (MetaDisplay *display, Window xwindow, guint32 timestamp)
 
static void ungrab_keyboard (MetaDisplay *display, guint32 timestamp)
 
gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp)
 
void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp)
 
gboolean meta_window_grab_all_keys (MetaWindow *window, guint32 timestamp)
 
void meta_window_ungrab_all_keys (MetaWindow *window, guint32 timestamp)
 
static gboolean is_modifier (MetaDisplay *display, unsigned int keycode)
 
static gboolean is_specific_modifier (MetaDisplay *display, unsigned int keycode, unsigned int mask)
 
static unsigned int get_primary_modifier (MetaDisplay *display, unsigned int entire_binding_mask)
 
static gboolean keycode_is_primary_modifier (MetaDisplay *display, unsigned int keycode, unsigned int entire_binding_mask)
 
static gboolean primary_modifier_still_pressed (MetaDisplay *display, unsigned int entire_binding_mask)
 
static gboolean process_event (MetaKeyBinding *bindings, int n_bindings, MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, gboolean on_window)
 
void meta_display_process_key_event (MetaDisplay *display, MetaWindow *window, XEvent *event)
 
static gboolean process_keyboard_resize_grab_op_change (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, KeySym keysym)
 
static gboolean end_keyboard_grab (MetaDisplay *display, unsigned int keycode)
 
static void handle_switch_to_workspace (MetaDisplay *display, MetaScreen *screen, MetaWindow *event_window, XEvent *event, MetaKeyBinding *binding)
 
static void error_on_command (int command_index, const char *command, const char *message, const char *screen_name, guint32 timestamp)
 
static gboolean meta_spawn_command_line_async_on_screen (const gchar *command_line, MetaScreen *screen, GError **error)
 
static void handle_run_command (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_maximize_vertically (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_maximize_horizontally (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_corner_backend (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, gboolean xchange, gboolean ychange, gboolean to_right, gboolean to_bottom)
 
static void handle_move_to_corner_nw (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_corner_ne (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_corner_sw (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_corner_se (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_side_n (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_side_s (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_side_e (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_side_w (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_center (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_monitor (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_show_desktop (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_panel (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_activate_window_menu (MetaDisplay *display, MetaScreen *screen, MetaWindow *event_window, XEvent *event, MetaKeyBinding *binding)
 
static MetaGrabOp tab_op_from_tab_type (MetaTabList type)
 
static MetaGrabOp cycle_op_from_tab_type (MetaTabList type)
 
static void do_choose_window (MetaDisplay *display, MetaScreen *screen, MetaWindow *event_window, XEvent *event, MetaKeyBinding *binding, gboolean backward, gboolean show_popup)
 
static void handle_switch (MetaDisplay *display, MetaScreen *screen, MetaWindow *event_window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_cycle (MetaDisplay *display, MetaScreen *screen, MetaWindow *event_window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_fullscreen (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_above (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_tiled (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_maximized (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_maximize (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_unmaximize (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_shaded (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_close (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_minimize (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_begin_move (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_begin_resize (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_toggle_on_all_workspaces (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_move_to_workspace (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_raise_or_lower (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_raise (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_lower (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static void handle_set_spew_mark (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
void meta_set_keybindings_disabled (gboolean setting)
 
static void handle_run_terminal (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 
static gboolean handle_rename_workspace_callback (GIOChannel *ioc, GIOCondition cond, gpointer data)
 
static void handle_rename_workspace (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)
 

Variables

static gboolean all_bindings_disabled = FALSE
 
static const MetaKeyHandler key_handlers []
 
static gboolean already_displaying_rename_workspace = FALSE
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   /* for putenv() */

◆ keybind [1/2]

#define keybind (   name,
  handler,
  param,
  flags 
)
Value:
static void \
handler (MetaDisplay *display,\
MetaWindow *window,\
XEvent *event,\
MetaKeyBinding *binding);
static GdkScreen * screen
Definition fixedtip.c:40
Definition display-private.h:80
Definition keybindings.c:126
Definition screen-private.h:71
Definition window-private.h:101

◆ keybind [2/2]

#define keybind (   name,
  handler,
  param,
  flags 
)     { #name, handler, param, flags },

◆ NORMAL_INCREMENT [1/2]

#define NORMAL_INCREMENT   10

◆ NORMAL_INCREMENT [2/2]

#define NORMAL_INCREMENT   10

◆ RENAME_WORKSPACE_BUFSIZE

#define RENAME_WORKSPACE_BUFSIZE   512

◆ SMALL_INCREMENT [1/2]

#define SMALL_INCREMENT   1

◆ SMALL_INCREMENT [2/2]

#define SMALL_INCREMENT   1

Typedef Documentation

◆ MetaKeyHandlerFunc

typedef void(* MetaKeyHandlerFunc) (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, XEvent *event, MetaKeyBinding *binding)

Function Documentation

◆ bindings_changed_callback()

static void bindings_changed_callback ( MetaPreference  pref,
void *  data 
)
static

References META_PREF_KEYBINDINGS, rebuild_key_binding_table(), regrab_key_bindings(), reload_keycodes(), and reload_modifiers().

Referenced by meta_display_init_keys(), and meta_display_shutdown_keys().

Here is the call graph for this function:

◆ count_bindings()

static int count_bindings ( const MetaKeyPref *  prefs,
int  n_prefs 
)
static

◆ cycle_op_from_tab_type()

◆ display_get_keybinding_action()

static MetaKeyBindingAction display_get_keybinding_action ( MetaDisplay *  display,
unsigned int  keysym,
unsigned int  keycode,
unsigned long  mask 
)
static

References _MetaDisplay::key_bindings, _MetaKeyBinding::keycode, _MetaKeyBinding::keysym, _MetaKeyBinding::mask, META_KEYBINDING_ACTION_NONE, meta_prefs_get_keybinding_action(), _MetaDisplay::n_key_bindings, and _MetaKeyBinding::name.

Referenced by process_tab_grab(), and process_workspace_switch_grab().

Here is the call graph for this function:

◆ do_choose_window()

◆ end_keyboard_grab()

static gboolean end_keyboard_grab ( MetaDisplay *  display,
unsigned int  keycode 
)
static

References FALSE, get_primary_modifier(), _MetaDisplay::grab_mask, keycode_is_primary_modifier(), TRUE, and _MetaDisplay::xdisplay.

Referenced by process_tab_grab(), and process_workspace_switch_grab().

Here is the call graph for this function:

◆ error_on_command()

static void error_on_command ( int  command_index,
const char *  command,
const char *  message,
const char *  screen_name,
guint32  timestamp 
)
static

References _, meta_show_dialog(), meta_warning(), and NULL.

Referenced by handle_run_command(), and handle_run_terminal().

Here is the call graph for this function:

◆ find_handler()

static const MetaKeyHandler * find_handler ( const MetaKeyHandler *  handlers,
const char *  name 
)
static

References MetaKeyHandler::name, and NULL.

Referenced by rebuild_binding_table().

◆ get_primary_modifier()

static unsigned int get_primary_modifier ( MetaDisplay *  display,
unsigned int  entire_binding_mask 
)
static

◆ grab_keyboard()

static gboolean grab_keyboard ( MetaDisplay *  display,
Window  xwindow,
guint32  timestamp 
)
static

References FALSE, META_DEBUG_KEYBINDINGS, meta_error_trap_pop_with_return(), meta_error_trap_push(), TRUE, and _MetaDisplay::xdisplay.

Referenced by meta_screen_grab_all_keys(), and meta_window_grab_all_keys().

Here is the call graph for this function:

◆ grab_keys()

static void grab_keys ( MetaKeyBinding *  bindings,
int  n_bindings,
MetaDisplay *  display,
Window  xwindow,
gboolean  binding_per_window 
)
static

References BINDING_PER_WINDOW, FALSE, _MetaKeyBinding::keycode, meta_error_trap_pop(), meta_error_trap_push(), meta_grab_key(), and NULL.

Referenced by meta_screen_grab_keys(), and meta_window_grab_keys().

Here is the call graph for this function:

◆ handle_activate_window_menu()

static void handle_activate_window_menu ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  event_window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaDisplay::focus_window, META_UI_DIRECTION_RTL, meta_ui_get_direction(), meta_window_get_position(), meta_window_show_menu(), _MetaWindow::rect, and _MetaRectangle::width.

Here is the call graph for this function:

◆ handle_begin_move()

static void handle_begin_move ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, _MetaWindow::has_move_func, META_GRAB_OP_KEYBOARD_MOVING, and meta_window_begin_grab_op().

Here is the call graph for this function:

◆ handle_begin_resize()

static void handle_begin_resize ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, _MetaWindow::has_resize_func, META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN, and meta_window_begin_grab_op().

Here is the call graph for this function:

◆ handle_close()

static void handle_close ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_close_func, and meta_window_delete().

Here is the call graph for this function:

◆ handle_cycle()

static void handle_cycle ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  event_window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References BINDING_IS_REVERSED, do_choose_window(), FALSE, MetaKeyHandler::flags, _MetaKeyBinding::handler, and screen.

Here is the call graph for this function:

◆ handle_lower()

static void handle_lower ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References meta_window_lower().

Here is the call graph for this function:

◆ handle_maximize()

static void handle_maximize ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_maximize_func, META_MAXIMIZE_HORIZONTAL, META_MAXIMIZE_VERTICAL, and meta_window_maximize().

Here is the call graph for this function:

◆ handle_maximize_horizontally()

static void handle_maximize_horizontally ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_resize_func, _MetaWindow::maximized_horizontally, META_MAXIMIZE_HORIZONTAL, meta_window_maximize(), and meta_window_unmaximize().

Here is the call graph for this function:

◆ handle_maximize_vertically()

static void handle_maximize_vertically ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_resize_func, _MetaWindow::maximized_vertically, META_MAXIMIZE_VERTICAL, meta_window_maximize(), and meta_window_unmaximize().

Here is the call graph for this function:

◆ handle_minimize()

static void handle_minimize ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_minimize_func, and meta_window_minimize().

Here is the call graph for this function:

◆ handle_move_to_center()

static void handle_move_to_center ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

◆ handle_move_to_corner_backend()

static void handle_move_to_corner_backend ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
gboolean  xchange,
gboolean  ychange,
gboolean  to_right,
gboolean  to_bottom 
)
static

◆ handle_move_to_corner_ne()

static void handle_move_to_corner_ne ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_corner_nw()

static void handle_move_to_corner_nw ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_corner_se()

static void handle_move_to_corner_se ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_corner_sw()

static void handle_move_to_corner_sw ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_monitor()

static void handle_move_to_monitor ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References MetaKeyHandler::data, _MetaKeyBinding::handler, meta_screen_get_xinerama_for_window(), meta_screen_get_xinerama_neighbor(), meta_window_move_to_monitor(), NULL, _MetaXineramaScreenInfo::number, and screen.

Here is the call graph for this function:

◆ handle_move_to_side_e()

static void handle_move_to_side_e ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_side_n()

static void handle_move_to_side_n ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_side_s()

static void handle_move_to_side_s ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_side_w()

static void handle_move_to_side_w ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References FALSE, handle_move_to_corner_backend(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_move_to_workspace()

static void handle_move_to_workspace ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::always_sticky, MetaKeyHandler::data, handle_workspace_switch_or_move(), _MetaKeyBinding::handler, meta_screen_get_workspace_by_index(), meta_window_change_workspace(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_panel()

static void handle_panel ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References MetaKeyHandler::data, FALSE, _MetaKeyBinding::handler, META_DEBUG_KEYBINDINGS, meta_error_trap_pop(), meta_error_trap_push(), META_KEYBINDING_ACTION_PANEL_MAIN_MENU, META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, _MetaDisplay::mouse_mode, screen, and _MetaDisplay::xdisplay.

Here is the call graph for this function:

◆ handle_raise()

static void handle_raise ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References meta_window_raise().

Here is the call graph for this function:

◆ handle_raise_or_lower()

static void handle_raise_or_lower ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::mapped, meta_rectangle_intersect(), meta_stack_get_above(), meta_stack_get_top(), meta_window_get_outer_rect(), meta_window_lower(), meta_window_raise(), NULL, _MetaWindow::screen, _MetaScreen::stack, and TRUE.

Here is the call graph for this function:

◆ handle_rename_workspace()

static void handle_rename_workspace ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _, already_displaying_rename_workspace, handle_rename_workspace_callback(), META_DEBUG_KEYBINDINGS, meta_prefs_get_workspace_name(), meta_show_entry_dialog(), meta_workspace_index(), screen, and TRUE.

Here is the call graph for this function:

◆ handle_rename_workspace_callback()

static gboolean handle_rename_workspace_callback ( GIOChannel *  ioc,
GIOCondition  cond,
gpointer  data 
)
static

References already_displaying_rename_workspace, FALSE, META_DEBUG_KEYBINDINGS, meta_prefs_change_workspace_name(), meta_warning(), NULL, RENAME_WORKSPACE_BUFSIZE, and TRUE.

Referenced by handle_rename_workspace().

Here is the call graph for this function:

◆ handle_run_command()

static void handle_run_command ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _, AREA_SCREENSHOT_COMMAND_IDX, MetaKeyHandler::data, error_on_command(), _MetaKeyBinding::handler, META_DEBUG_KEYBINDINGS, meta_prefs_get_command(), meta_spawn_command_line_async_on_screen(), NULL, screen, SCREENSHOT_COMMAND_IDX, and ungrab_keyboard().

Here is the call graph for this function:

◆ handle_run_terminal()

static void handle_run_terminal ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _, error_on_command(), META_DEBUG_KEYBINDINGS, meta_prefs_get_terminal_command(), meta_spawn_command_line_async_on_screen(), NULL, and screen.

Here is the call graph for this function:

◆ handle_set_spew_mark()

static void handle_set_spew_mark ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

◆ handle_show_desktop()

static void handle_show_desktop ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References meta_screen_show_desktop(), meta_screen_unshow_desktop(), meta_workspace_focus_default_window(), NULL, and screen.

Here is the call graph for this function:

◆ handle_switch()

static void handle_switch ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  event_window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References BINDING_IS_REVERSED, do_choose_window(), MetaKeyHandler::flags, _MetaKeyBinding::handler, screen, and TRUE.

Here is the call graph for this function:

◆ handle_switch_to_workspace()

static void handle_switch_to_workspace ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  event_window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References MetaKeyHandler::data, FALSE, handle_workspace_switch_or_move(), _MetaKeyBinding::handler, META_MOTION_PREV, meta_screen_get_workspace_by_index(), meta_workspace_activate(), and screen.

Here is the call graph for this function:

◆ handle_toggle_above()

static void handle_toggle_above ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References meta_window_make_above(), meta_window_unmake_above(), and _MetaWindow::wm_state_above.

Here is the call graph for this function:

◆ handle_toggle_fullscreen()

static void handle_toggle_fullscreen ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::fullscreen, _MetaWindow::has_fullscreen_func, meta_window_make_fullscreen(), and meta_window_unmake_fullscreen().

Here is the call graph for this function:

◆ handle_toggle_maximized()

static void handle_toggle_maximized ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_maximize_func, META_MAXIMIZE_HORIZONTAL, META_MAXIMIZE_VERTICAL, meta_window_maximize(), META_WINDOW_MAXIMIZED, and meta_window_unmaximize().

Here is the call graph for this function:

◆ handle_toggle_on_all_workspaces()

static void handle_toggle_on_all_workspaces ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References meta_window_stick(), meta_window_unstick(), and _MetaWindow::on_all_workspaces.

Here is the call graph for this function:

◆ handle_toggle_shaded()

static void handle_toggle_shaded ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::has_shade_func, meta_window_shade(), meta_window_unshade(), and _MetaWindow::shaded.

Here is the call graph for this function:

◆ handle_toggle_tiled()

◆ handle_unmaximize()

static void handle_unmaximize ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
MetaKeyBinding *  binding 
)
static

References _MetaWindow::maximized_horizontally, _MetaWindow::maximized_vertically, META_MAXIMIZE_HORIZONTAL, META_MAXIMIZE_VERTICAL, META_WINDOW_CORNER_TILED, and meta_window_unmaximize().

Here is the call graph for this function:

◆ handle_workspace_switch_or_move()

◆ is_modifier()

static gboolean is_modifier ( MetaDisplay *  display,
unsigned int  keycode 
)
static

◆ is_specific_modifier()

static gboolean is_specific_modifier ( MetaDisplay *  display,
unsigned int  keycode,
unsigned int  mask 
)
static

◆ keycode_is_primary_modifier()

static gboolean keycode_is_primary_modifier ( MetaDisplay *  display,
unsigned int  keycode,
unsigned int  entire_binding_mask 
)
static

References FALSE, get_primary_modifier(), is_specific_modifier(), and META_DEBUG_KEYBINDINGS.

Referenced by end_keyboard_grab().

Here is the call graph for this function:

◆ keysym_name()

static const char * keysym_name ( int  keysym)
static

References NULL.

Referenced by meta_change_keygrab().

◆ meta_change_keygrab()

static void meta_change_keygrab ( MetaDisplay *  display,
Window  xwindow,
gboolean  grab,
int  keysym,
unsigned int  keycode,
int  modmask 
)
static

References _, FALSE, _MetaDisplay::ignored_modifier_mask, keysym_name(), META_DEBUG_KEYBINDINGS, meta_error_trap_pop(), meta_error_trap_pop_with_return(), meta_error_trap_push(), meta_is_debugging(), meta_warning(), and _MetaDisplay::xdisplay.

Referenced by meta_grab_key().

Here is the call graph for this function:

◆ meta_display_init_keys()

◆ meta_display_process_key_event()

void meta_display_process_key_event ( MetaDisplay *  display,
MetaWindow *  window,
XEvent *  event 
)

References all_bindings_disabled, _MetaWindow::all_keys_grabbed, _MetaWindow::desc, _MetaDisplay::grab_op, _MetaDisplay::grab_screen, _MetaDisplay::grab_window, _MetaDisplay::key_bindings, META_DEBUG_KEYBINDINGS, meta_display_end_grab_op(), meta_display_lookup_x_window(), meta_display_screen_for_root(), meta_display_screen_for_xwindow(), META_GRAB_OP_KEYBOARD_ESCAPING_DOCK, META_GRAB_OP_KEYBOARD_ESCAPING_GROUP, META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL, META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL_ALL_WORKSPACES, META_GRAB_OP_KEYBOARD_MOVING, META_GRAB_OP_KEYBOARD_RESIZING_E, META_GRAB_OP_KEYBOARD_RESIZING_N, META_GRAB_OP_KEYBOARD_RESIZING_NE, META_GRAB_OP_KEYBOARD_RESIZING_NW, META_GRAB_OP_KEYBOARD_RESIZING_S, META_GRAB_OP_KEYBOARD_RESIZING_SE, META_GRAB_OP_KEYBOARD_RESIZING_SW, META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN, META_GRAB_OP_KEYBOARD_RESIZING_W, META_GRAB_OP_KEYBOARD_TABBING_DOCK, META_GRAB_OP_KEYBOARD_TABBING_GROUP, META_GRAB_OP_KEYBOARD_TABBING_NORMAL, META_GRAB_OP_KEYBOARD_TABBING_NORMAL_ALL_WORKSPACES, META_GRAB_OP_KEYBOARD_WORKSPACE_MOVING, META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING, META_GRAB_OP_MOVING, META_GRAB_OP_NONE, META_GRAB_OP_RESIZING_E, META_GRAB_OP_RESIZING_N, META_GRAB_OP_RESIZING_NE, META_GRAB_OP_RESIZING_NW, META_GRAB_OP_RESIZING_S, META_GRAB_OP_RESIZING_SE, META_GRAB_OP_RESIZING_SW, META_GRAB_OP_RESIZING_W, meta_ui_window_is_widget(), _MetaDisplay::n_key_bindings, NULL, process_event(), process_keyboard_move_grab(), process_keyboard_resize_grab(), process_mouse_move_resize_grab(), process_tab_grab(), process_workspace_switch_grab(), screen, TRUE, and _MetaDisplay::xdisplay.

Referenced by event_callback().

Here is the call graph for this function:

◆ meta_display_process_mapping_event()

void meta_display_process_mapping_event ( MetaDisplay *  display,
XEvent *  event 
)

References FALSE, META_DEBUG_KEYBINDINGS, regrab_key_bindings(), reload_keycodes(), reload_keymap(), reload_modifiers(), reload_modmap(), and TRUE.

Referenced by event_callback().

Here is the call graph for this function:

◆ meta_display_shutdown_keys()

void meta_display_shutdown_keys ( MetaDisplay *  display)

References bindings_changed_callback(), _MetaDisplay::key_bindings, _MetaDisplay::keymap, meta_prefs_remove_listener(), meta_XFree, and _MetaDisplay::modmap.

Referenced by meta_display_close().

Here is the call graph for this function:

◆ meta_grab_key()

static void meta_grab_key ( MetaDisplay *  display,
Window  xwindow,
int  keysym,
unsigned int  keycode,
int  modmask 
)
static

References meta_change_keygrab(), and TRUE.

Referenced by grab_keys().

Here is the call graph for this function:

◆ meta_screen_grab_all_keys()

gboolean meta_screen_grab_all_keys ( MetaScreen *  screen,
guint32  timestamp 
)

References FALSE, grab_keyboard(), META_DEBUG_KEYBINDINGS, meta_screen_grab_keys(), meta_screen_ungrab_keys(), screen, and TRUE.

Referenced by meta_display_begin_grab_op().

Here is the call graph for this function:

◆ meta_screen_grab_keys()

void meta_screen_grab_keys ( MetaScreen *  screen)

References FALSE, grab_keys(), screen, and TRUE.

Referenced by meta_screen_grab_all_keys(), meta_screen_new(), meta_screen_ungrab_all_keys(), and regrab_key_bindings().

Here is the call graph for this function:

◆ meta_screen_ungrab_all_keys()

void meta_screen_ungrab_all_keys ( MetaScreen *  screen,
guint32  timestamp 
)

References FALSE, meta_screen_grab_keys(), screen, and ungrab_keyboard().

Referenced by meta_display_end_grab_op().

Here is the call graph for this function:

◆ meta_screen_ungrab_keys()

void meta_screen_ungrab_keys ( MetaScreen *  screen)

References FALSE, screen, and ungrab_all_keys().

Referenced by meta_screen_free(), meta_screen_grab_all_keys(), and regrab_key_bindings().

Here is the call graph for this function:

◆ meta_set_keybindings_disabled()

void meta_set_keybindings_disabled ( gboolean  setting)

◆ meta_spawn_command_line_async_on_screen()

static gboolean meta_spawn_command_line_async_on_screen ( const gchar *  command_line,
MetaScreen *  screen,
GError **  error 
)
static

References FALSE, NULL, screen, and TRUE.

Referenced by handle_run_command(), and handle_run_terminal().

◆ meta_window_grab_all_keys()

gboolean meta_window_grab_all_keys ( MetaWindow *  window,
guint32  timestamp 
)

◆ meta_window_grab_keys()

◆ meta_window_ungrab_all_keys()

void meta_window_ungrab_all_keys ( MetaWindow *  window,
guint32  timestamp 
)

References _MetaWindow::all_keys_grabbed, _MetaWindow::display, FALSE, _MetaWindow::grab_on_frame, _MetaWindow::keys_grabbed, meta_window_grab_keys(), and ungrab_keyboard().

Referenced by meta_display_end_grab_op().

Here is the call graph for this function:

◆ meta_window_ungrab_keys()

void meta_window_ungrab_keys ( MetaWindow *  window)

References _MetaWindow::display, FALSE, _MetaWindow::frame, _MetaWindow::grab_on_frame, _MetaWindow::keys_grabbed, NULL, ungrab_all_keys(), _MetaFrame::xwindow, and _MetaWindow::xwindow.

Referenced by meta_window_free(), meta_window_grab_all_keys(), and regrab_key_bindings().

Here is the call graph for this function:

◆ primary_modifier_still_pressed()

static gboolean primary_modifier_still_pressed ( MetaDisplay *  display,
unsigned int  entire_binding_mask 
)
static

References FALSE, get_primary_modifier(), META_DEBUG_KEYBINDINGS, _MetaScreen::no_focus_window, _MetaDisplay::screens, TRUE, and _MetaDisplay::xdisplay.

Referenced by do_choose_window(), and handle_workspace_switch_or_move().

Here is the call graph for this function:

◆ process_event()

static gboolean process_event ( MetaKeyBinding *  bindings,
int  n_bindings,
MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
gboolean  on_window 
)
static

References _MetaDisplay::allow_terminal_deactivation, BINDING_PER_WINDOW, FALSE, MetaKeyHandler::flags, MetaKeyHandler::func, _MetaKeyBinding::handler, _MetaDisplay::ignored_modifier_mask, _MetaKeyBinding::keycode, _MetaKeyBinding::mask, meta_bug(), META_DEBUG_KEYBINDINGS, NULL, screen, and TRUE.

Referenced by meta_display_process_key_event().

Here is the call graph for this function:

◆ process_keyboard_move_grab()

◆ process_keyboard_resize_grab()

◆ process_keyboard_resize_grab_op_change()

static gboolean process_keyboard_resize_grab_op_change ( MetaDisplay *  display,
MetaScreen *  screen,
MetaWindow *  window,
XEvent *  event,
KeySym  keysym 
)
static

◆ process_mouse_move_resize_grab()

◆ process_tab_grab()

static gboolean process_tab_grab ( MetaDisplay *  display,
MetaScreen *  screen,
XEvent *  event,
KeySym  keysym 
)
static

References ARROW_DOWN, ARROW_DOWN_PAD, ARROW_LEFT, ARROW_LEFT_PAD, ARROW_RIGHT, ARROW_RIGHT_PAD, ARROW_UP, ARROW_UP_PAD, _MetaWindow::desc, display_get_keybinding_action(), end_keyboard_grab(), FALSE, _MetaDisplay::grab_mask, _MetaDisplay::grab_old_window_stacking, _MetaDisplay::grab_op, _MetaDisplay::grab_screen, is_modifier(), META_DEBUG_FOCUS, META_DEBUG_KEYBINDINGS, meta_display_end_grab_op(), meta_display_lookup_x_window(), META_GRAB_OP_KEYBOARD_ESCAPING_DOCK, META_GRAB_OP_KEYBOARD_ESCAPING_GROUP, META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL, META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL_ALL_WORKSPACES, META_GRAB_OP_KEYBOARD_TABBING_DOCK, META_GRAB_OP_KEYBOARD_TABBING_GROUP, META_GRAB_OP_KEYBOARD_TABBING_NORMAL, META_GRAB_OP_KEYBOARD_TABBING_NORMAL_ALL_WORKSPACES, META_KEYBINDING_ACTION_CYCLE_GROUP, META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD, META_KEYBINDING_ACTION_CYCLE_PANELS, META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD, META_KEYBINDING_ACTION_CYCLE_WINDOWS, META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD, META_KEYBINDING_ACTION_SWITCH_GROUP, META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD, META_KEYBINDING_ACTION_SWITCH_PANELS, META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD, META_KEYBINDING_ACTION_SWITCH_WINDOWS, META_KEYBINDING_ACTION_SWITCH_WINDOWS_ALL, META_KEYBINDING_ACTION_SWITCH_WINDOWS_ALL_BACKWARD, META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD, meta_prefs_get_alt_tab_raise_windows(), meta_stack_set_positions(), meta_ui_tab_popup_backward(), meta_ui_tab_popup_down(), meta_ui_tab_popup_forward(), meta_ui_tab_popup_get_selected(), meta_ui_tab_popup_up(), meta_window_activate(), meta_window_minimize(), meta_window_raise(), meta_window_unminimize(), _MetaWindow::minimized, _MetaDisplay::mouse_mode, NULL, screen, _MetaWindow::tab_unminimized, and TRUE.

Referenced by meta_display_process_key_event().

Here is the call graph for this function:

◆ process_workspace_switch_grab()

◆ rebuild_binding_table()

static void rebuild_binding_table ( MetaDisplay *  display,
MetaKeyBinding **  bindings_p,
int *  n_bindings_p,
const MetaKeyPref *  prefs,
int  n_prefs 
)
static

References MetaKeyPref::bindings, count_bindings(), find_handler(), key_handlers, MetaKeyCombo::keycode, MetaKeyCombo::keysym, META_DEBUG_KEYBINDINGS, META_VIRTUAL_SHIFT_MASK, MetaKeyCombo::modifiers, and MetaKeyPref::name.

Referenced by rebuild_key_binding_table().

Here is the call graph for this function:

◆ rebuild_key_binding_table()

static void rebuild_key_binding_table ( MetaDisplay *  display)
static

References _MetaDisplay::key_bindings, META_DEBUG_KEYBINDINGS, meta_prefs_get_key_bindings(), _MetaDisplay::n_key_bindings, and rebuild_binding_table().

Referenced by bindings_changed_callback(), and meta_display_init_keys().

Here is the call graph for this function:

◆ regrab_key_bindings()

static void regrab_key_bindings ( MetaDisplay *  display)
static

References FALSE, meta_display_list_windows(), meta_error_trap_pop(), meta_error_trap_push(), meta_screen_grab_keys(), meta_screen_ungrab_keys(), meta_window_grab_keys(), meta_window_ungrab_keys(), NULL, screen, _MetaDisplay::screens, and windows.

Referenced by bindings_changed_callback(), and meta_display_process_mapping_event().

Here is the call graph for this function:

◆ reload_keycodes()

◆ reload_keymap()

◆ reload_modifiers()

static void reload_modifiers ( MetaDisplay *  display)
static

References _MetaDisplay::key_bindings, _MetaKeyBinding::mask, META_DEBUG_KEYBINDINGS, meta_display_devirtualize_modifiers(), _MetaKeyBinding::modifiers, and _MetaKeyBinding::name.

Referenced by bindings_changed_callback(), meta_display_init_keys(), and meta_display_process_mapping_event().

Here is the call graph for this function:

◆ reload_modmap()

◆ tab_op_from_tab_type()

◆ ungrab_all_keys()

static void ungrab_all_keys ( MetaDisplay *  display,
Window  xwindow 
)
static

References FALSE, META_DEBUG_KEYBINDINGS, meta_error_trap_pop(), meta_error_trap_pop_with_return(), meta_error_trap_push(), meta_is_debugging(), and _MetaDisplay::xdisplay.

Referenced by meta_screen_ungrab_keys(), meta_window_grab_keys(), and meta_window_ungrab_keys().

Here is the call graph for this function:

◆ ungrab_keyboard()

static void ungrab_keyboard ( MetaDisplay *  display,
guint32  timestamp 
)
static

References FALSE, META_DEBUG_KEYBINDINGS, meta_error_trap_pop(), meta_error_trap_push(), and _MetaDisplay::xdisplay.

Referenced by handle_run_command(), meta_screen_ungrab_all_keys(), and meta_window_ungrab_all_keys().

Here is the call graph for this function:

Variable Documentation

◆ all_bindings_disabled

gboolean all_bindings_disabled = FALSE
static

◆ already_displaying_rename_workspace

gboolean already_displaying_rename_workspace = FALSE
static

◆ key_handlers

const MetaKeyHandler key_handlers[]
static
Initial value:
= {
{ NULL, NULL, 0, 0 }
}
#define NULL
Definition async-getprop.c:44

Referenced by rebuild_binding_table().