keybindings: Fix whitespace and alignment
https://bugzilla.gnome.org/show_bug.cgi?id=688779
This commit is contained in:
parent
6139bc77ec
commit
2fcbc467e8
@ -113,33 +113,33 @@ static void handle_workspace_switch (MetaDisplay *display,
|
|||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy);
|
gpointer dummy);
|
||||||
|
|
||||||
static gboolean process_mouse_move_resize_grab (MetaDisplay *display,
|
static gboolean process_mouse_move_resize_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym);
|
KeySym keysym);
|
||||||
|
|
||||||
static gboolean process_keyboard_move_grab (MetaDisplay *display,
|
static gboolean process_keyboard_move_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym);
|
KeySym keysym);
|
||||||
|
|
||||||
static gboolean process_keyboard_resize_grab (MetaDisplay *display,
|
static gboolean process_keyboard_resize_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym);
|
KeySym keysym);
|
||||||
|
|
||||||
static gboolean process_tab_grab (MetaDisplay *display,
|
static gboolean process_tab_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym);
|
KeySym keysym);
|
||||||
|
|
||||||
static gboolean process_workspace_switch_grab (MetaDisplay *display,
|
static gboolean process_workspace_switch_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym);
|
KeySym keysym);
|
||||||
|
|
||||||
static void regrab_key_bindings (MetaDisplay *display);
|
static void regrab_key_bindings (MetaDisplay *display);
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ rebuild_binding_table (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Binding %s also needs Shift grabbed\n",
|
"Binding %s also needs Shift grabbed\n",
|
||||||
pref->name);
|
pref->name);
|
||||||
|
|
||||||
(*bindings_p)[i].name = pref->name;
|
(*bindings_p)[i].name = pref->name;
|
||||||
(*bindings_p)[i].handler = handler;
|
(*bindings_p)[i].handler = handler;
|
||||||
@ -1383,14 +1383,14 @@ invoke_handler (MetaDisplay *display,
|
|||||||
if (handler->func)
|
if (handler->func)
|
||||||
(* handler->func) (display, screen,
|
(* handler->func) (display, screen,
|
||||||
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
||||||
window : NULL,
|
window : NULL,
|
||||||
event,
|
event,
|
||||||
binding,
|
binding,
|
||||||
handler->user_data);
|
handler->user_data);
|
||||||
else
|
else
|
||||||
(* handler->default_func) (display, screen,
|
(* handler->default_func) (display, screen,
|
||||||
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
handler->flags & META_KEY_BINDING_PER_WINDOW ?
|
||||||
window: NULL,
|
window: NULL,
|
||||||
event,
|
event,
|
||||||
binding,
|
binding,
|
||||||
NULL);
|
NULL);
|
||||||
@ -1532,10 +1532,10 @@ process_overlay_key (MetaDisplay *display,
|
|||||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||||
{
|
{
|
||||||
MetaKeyBinding *binding =
|
MetaKeyBinding *binding =
|
||||||
display_get_keybinding (display,
|
display_get_keybinding (display,
|
||||||
display->overlay_key_combo.keysym,
|
display->overlay_key_combo.keysym,
|
||||||
display->overlay_key_combo.keycode,
|
display->overlay_key_combo.keycode,
|
||||||
display->grab_mask);
|
display->grab_mask);
|
||||||
if (binding &&
|
if (binding &&
|
||||||
meta_compositor_filter_keybinding (display->compositor, screen, binding))
|
meta_compositor_filter_keybinding (display->compositor, screen, binding))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1645,9 +1645,9 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
if (display->grab_op == META_GRAB_OP_NONE)
|
if (display->grab_op == META_GRAB_OP_NONE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
/* If we get here we have a global grab, because
|
/* If we get here we have a global grab, because
|
||||||
* we're in some special keyboard mode such as window move
|
* we're in some special keyboard mode such as window move
|
||||||
* mode.
|
* mode.
|
||||||
*/
|
*/
|
||||||
if (window ? (window == display->grab_window) :
|
if (window ? (window == display->grab_window) :
|
||||||
(screen == display->grab_screen))
|
(screen == display->grab_screen))
|
||||||
{
|
{
|
||||||
@ -1733,11 +1733,11 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_mouse_move_resize_grab (MetaDisplay *display,
|
process_mouse_move_resize_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
/* don't care about releases, but eat them, don't end grab */
|
/* don't care about releases, but eat them, don't end grab */
|
||||||
if (event->evtype == XI_KeyRelease)
|
if (event->evtype == XI_KeyRelease)
|
||||||
@ -1780,11 +1780,11 @@ process_mouse_move_resize_grab (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_keyboard_move_grab (MetaDisplay *display,
|
process_keyboard_move_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
gboolean handled;
|
gboolean handled;
|
||||||
int x, y;
|
int x, y;
|
||||||
@ -1902,11 +1902,11 @@ process_keyboard_move_grab (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_keyboard_resize_grab_op_change (MetaDisplay *display,
|
process_keyboard_resize_grab_op_change (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
gboolean handled;
|
gboolean handled;
|
||||||
|
|
||||||
@ -2024,11 +2024,11 @@ process_keyboard_resize_grab_op_change (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_keyboard_resize_grab (MetaDisplay *display,
|
process_keyboard_resize_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
gboolean handled;
|
gboolean handled;
|
||||||
int height_inc;
|
int height_inc;
|
||||||
@ -2287,10 +2287,10 @@ end_keyboard_grab (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_tab_grab (MetaDisplay *display,
|
process_tab_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
MetaKeyBinding *binding;
|
MetaKeyBinding *binding;
|
||||||
MetaKeyBindingAction action;
|
MetaKeyBindingAction action;
|
||||||
@ -2440,16 +2440,16 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
/* CYCLE_* are traditionally Escape-based actions,
|
/* CYCLE_* are traditionally Escape-based actions,
|
||||||
* and should cancel traditionally Tab-based ones.
|
* and should cancel traditionally Tab-based ones.
|
||||||
*/
|
*/
|
||||||
switch (display->grab_op)
|
switch (display->grab_op)
|
||||||
{
|
{
|
||||||
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||||
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||||
/* carry on */
|
/* carry on */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case META_KEYBINDING_ACTION_SWITCH_PANELS:
|
case META_KEYBINDING_ACTION_SWITCH_PANELS:
|
||||||
case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
|
case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
|
||||||
case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS:
|
case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS:
|
||||||
@ -2488,9 +2488,9 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
|
case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
|
case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
|
||||||
/* carry on */
|
/* carry on */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -2603,11 +2603,11 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_switch_to_workspace (MetaDisplay *display,
|
handle_switch_to_workspace (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
gint which = binding->handler->data;
|
gint which = binding->handler->data;
|
||||||
MetaWorkspace *workspace;
|
MetaWorkspace *workspace;
|
||||||
@ -2644,11 +2644,11 @@ handle_switch_to_workspace (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_maximize_vertically (MetaDisplay *display,
|
handle_maximize_vertically (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (window->has_resize_func)
|
if (window->has_resize_func)
|
||||||
{
|
{
|
||||||
@ -2661,11 +2661,11 @@ handle_maximize_vertically (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_maximize_horizontally (MetaDisplay *display,
|
handle_maximize_horizontally (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (window->has_resize_func)
|
if (window->has_resize_func)
|
||||||
{
|
{
|
||||||
@ -2684,13 +2684,13 @@ handle_maximize_horizontally (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
handle_move_to_corner_backend (MetaDisplay *display,
|
handle_move_to_corner_backend (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean xchange,
|
gboolean xchange,
|
||||||
gboolean ychange,
|
gboolean ychange,
|
||||||
gboolean to_right,
|
gboolean to_right,
|
||||||
gboolean to_bottom,
|
gboolean to_bottom,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
MetaRectangle work_area;
|
MetaRectangle work_area;
|
||||||
MetaRectangle outer;
|
MetaRectangle outer;
|
||||||
@ -2703,16 +2703,16 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
|||||||
|
|
||||||
if (xchange) {
|
if (xchange) {
|
||||||
new_x = work_area.x + (to_right ?
|
new_x = work_area.x + (to_right ?
|
||||||
work_area.width - outer.width :
|
work_area.width - outer.width :
|
||||||
0);
|
0);
|
||||||
} else {
|
} else {
|
||||||
new_x = orig_x;
|
new_x = orig_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ychange) {
|
if (ychange) {
|
||||||
new_y = work_area.y + (to_bottom ?
|
new_y = work_area.y + (to_bottom ?
|
||||||
work_area.height - outer.height :
|
work_area.height - outer.height :
|
||||||
0);
|
0);
|
||||||
} else {
|
} else {
|
||||||
new_y = orig_y;
|
new_y = orig_y;
|
||||||
}
|
}
|
||||||
@ -2727,7 +2727,7 @@ static void
|
|||||||
handle_move_to_corner_nw (MetaDisplay *display,
|
handle_move_to_corner_nw (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2738,7 +2738,7 @@ static void
|
|||||||
handle_move_to_corner_ne (MetaDisplay *display,
|
handle_move_to_corner_ne (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2749,7 +2749,7 @@ static void
|
|||||||
handle_move_to_corner_sw (MetaDisplay *display,
|
handle_move_to_corner_sw (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2760,7 +2760,7 @@ static void
|
|||||||
handle_move_to_corner_se (MetaDisplay *display,
|
handle_move_to_corner_se (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2771,7 +2771,7 @@ static void
|
|||||||
handle_move_to_side_n (MetaDisplay *display,
|
handle_move_to_side_n (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2782,7 +2782,7 @@ static void
|
|||||||
handle_move_to_side_s (MetaDisplay *display,
|
handle_move_to_side_s (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2793,7 +2793,7 @@ static void
|
|||||||
handle_move_to_side_e (MetaDisplay *display,
|
handle_move_to_side_e (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2804,7 +2804,7 @@ static void
|
|||||||
handle_move_to_side_w (MetaDisplay *display,
|
handle_move_to_side_w (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2815,7 +2815,7 @@ static void
|
|||||||
handle_move_to_center (MetaDisplay *display,
|
handle_move_to_center (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -2832,18 +2832,18 @@ handle_move_to_center (MetaDisplay *display,
|
|||||||
frame_height = (window->frame ? window->frame->child_y : 0);
|
frame_height = (window->frame ? window->frame->child_y : 0);
|
||||||
|
|
||||||
meta_window_move_resize (window,
|
meta_window_move_resize (window,
|
||||||
TRUE,
|
TRUE,
|
||||||
work_area.x + (work_area.width +frame_width -outer.width )/2,
|
work_area.x + (work_area.width +frame_width -outer.width )/2,
|
||||||
work_area.y + (work_area.height+frame_height-outer.height)/2,
|
work_area.y + (work_area.height+frame_height-outer.height)/2,
|
||||||
window->rect.width,
|
window->rect.width,
|
||||||
window->rect.height);
|
window->rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
process_workspace_switch_grab (MetaDisplay *display,
|
process_workspace_switch_grab (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
KeySym keysym)
|
KeySym keysym)
|
||||||
{
|
{
|
||||||
MetaWorkspace *workspace;
|
MetaWorkspace *workspace;
|
||||||
|
|
||||||
@ -2955,11 +2955,11 @@ process_workspace_switch_grab (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_show_desktop (MetaDisplay *display,
|
handle_show_desktop (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (screen->active_workspace->showing_desktop)
|
if (screen->active_workspace->showing_desktop)
|
||||||
{
|
{
|
||||||
@ -2974,11 +2974,11 @@ handle_show_desktop (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_panel (MetaDisplay *display,
|
handle_panel (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
MetaKeyBindingAction action = binding->handler->data;
|
MetaKeyBindingAction action = binding->handler->data;
|
||||||
Atom action_atom;
|
Atom action_atom;
|
||||||
@ -2987,7 +2987,7 @@ handle_panel (MetaDisplay *display,
|
|||||||
action_atom = None;
|
action_atom = None;
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
/* FIXME: The numbers are wrong */
|
/* FIXME: The numbers are wrong */
|
||||||
case META_KEYBINDING_ACTION_PANEL_MAIN_MENU:
|
case META_KEYBINDING_ACTION_PANEL_MAIN_MENU:
|
||||||
action_atom = display->atom__GNOME_PANEL_ACTION_MAIN_MENU;
|
action_atom = display->atom__GNOME_PANEL_ACTION_MAIN_MENU;
|
||||||
break;
|
break;
|
||||||
@ -3026,11 +3026,11 @@ handle_panel (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_activate_window_menu (MetaDisplay *display,
|
handle_activate_window_menu (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (display->focus_window)
|
if (display->focus_window)
|
||||||
{
|
{
|
||||||
@ -3040,7 +3040,7 @@ handle_activate_window_menu (MetaDisplay *display,
|
|||||||
&x, &y);
|
&x, &y);
|
||||||
|
|
||||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||||
x += display->focus_window->rect.width;
|
x += display->focus_window->rect.width;
|
||||||
|
|
||||||
meta_window_show_menu (display->focus_window,
|
meta_window_show_menu (display->focus_window,
|
||||||
x, y,
|
x, y,
|
||||||
@ -3093,7 +3093,7 @@ static void
|
|||||||
do_choose_window (MetaDisplay *display,
|
do_choose_window (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gboolean backward,
|
gboolean backward,
|
||||||
gboolean show_popup)
|
gboolean show_popup)
|
||||||
@ -3195,11 +3195,11 @@ do_choose_window (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_switch (MetaDisplay *display,
|
handle_switch (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
|
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
|
||||||
|
|
||||||
@ -3209,11 +3209,11 @@ handle_switch (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_cycle (MetaDisplay *display,
|
handle_cycle (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
|
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
|
||||||
|
|
||||||
@ -3225,7 +3225,7 @@ static void
|
|||||||
handle_tab_popup_select (MetaDisplay *display,
|
handle_tab_popup_select (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3236,7 +3236,7 @@ static void
|
|||||||
handle_tab_popup_cancel (MetaDisplay *display,
|
handle_tab_popup_cancel (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3247,7 +3247,7 @@ static void
|
|||||||
handle_toggle_fullscreen (MetaDisplay *display,
|
handle_toggle_fullscreen (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3261,7 +3261,7 @@ static void
|
|||||||
handle_toggle_above (MetaDisplay *display,
|
handle_toggle_above (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3275,7 +3275,7 @@ static void
|
|||||||
handle_toggle_tiled (MetaDisplay *display,
|
handle_toggle_tiled (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3285,16 +3285,16 @@ handle_toggle_tiled (MetaDisplay *display,
|
|||||||
(META_WINDOW_TILED_RIGHT (window) && mode == META_TILE_RIGHT))
|
(META_WINDOW_TILED_RIGHT (window) && mode == META_TILE_RIGHT))
|
||||||
{
|
{
|
||||||
window->tile_monitor_number = window->saved_maximize ? window->monitor->number
|
window->tile_monitor_number = window->saved_maximize ? window->monitor->number
|
||||||
: -1;
|
: -1;
|
||||||
window->tile_mode = window->saved_maximize ? META_TILE_MAXIMIZED
|
window->tile_mode = window->saved_maximize ? META_TILE_MAXIMIZED
|
||||||
: META_TILE_NONE;
|
: META_TILE_NONE;
|
||||||
|
|
||||||
if (window->saved_maximize)
|
if (window->saved_maximize)
|
||||||
meta_window_maximize (window, META_MAXIMIZE_VERTICAL |
|
meta_window_maximize (window, META_MAXIMIZE_VERTICAL |
|
||||||
META_MAXIMIZE_HORIZONTAL);
|
META_MAXIMIZE_HORIZONTAL);
|
||||||
else
|
else
|
||||||
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL |
|
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL |
|
||||||
META_MAXIMIZE_HORIZONTAL);
|
META_MAXIMIZE_HORIZONTAL);
|
||||||
}
|
}
|
||||||
else if (meta_window_can_tile_side_by_side (window))
|
else if (meta_window_can_tile_side_by_side (window))
|
||||||
{
|
{
|
||||||
@ -3313,11 +3313,11 @@ handle_toggle_tiled (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_toggle_maximized (MetaDisplay *display,
|
handle_toggle_maximized (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (META_WINDOW_MAXIMIZED (window))
|
if (META_WINDOW_MAXIMIZED (window))
|
||||||
meta_window_unmaximize (window,
|
meta_window_unmaximize (window,
|
||||||
@ -3333,7 +3333,7 @@ static void
|
|||||||
handle_maximize (MetaDisplay *display,
|
handle_maximize (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3347,7 +3347,7 @@ static void
|
|||||||
handle_unmaximize (MetaDisplay *display,
|
handle_unmaximize (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3361,7 +3361,7 @@ static void
|
|||||||
handle_toggle_shaded (MetaDisplay *display,
|
handle_toggle_shaded (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3375,7 +3375,7 @@ static void
|
|||||||
handle_close (MetaDisplay *display,
|
handle_close (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3387,7 +3387,7 @@ static void
|
|||||||
handle_minimize (MetaDisplay *display,
|
handle_minimize (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3399,7 +3399,7 @@ static void
|
|||||||
handle_begin_move (MetaDisplay *display,
|
handle_begin_move (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3416,7 +3416,7 @@ static void
|
|||||||
handle_begin_resize (MetaDisplay *display,
|
handle_begin_resize (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3431,11 +3431,11 @@ handle_begin_resize (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_toggle_on_all_workspaces (MetaDisplay *display,
|
handle_toggle_on_all_workspaces (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
if (window->on_all_workspaces_requested)
|
if (window->on_all_workspaces_requested)
|
||||||
meta_window_unstick (window);
|
meta_window_unstick (window);
|
||||||
@ -3445,9 +3445,9 @@ handle_toggle_on_all_workspaces (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_move_to_workspace (MetaDisplay *display,
|
handle_move_to_workspace (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3502,7 +3502,7 @@ static void
|
|||||||
handle_raise_or_lower (MetaDisplay *display,
|
handle_raise_or_lower (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3549,7 +3549,7 @@ static void
|
|||||||
handle_raise (MetaDisplay *display,
|
handle_raise (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3560,7 +3560,7 @@ static void
|
|||||||
handle_lower (MetaDisplay *display,
|
handle_lower (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3625,9 +3625,9 @@ handle_workspace_switch (MetaDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_set_spew_mark (MetaDisplay *display,
|
handle_set_spew_mark (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XIDeviceEvent *event,
|
XIDeviceEvent *event,
|
||||||
MetaKeyBinding *binding,
|
MetaKeyBinding *binding,
|
||||||
gpointer dummy)
|
gpointer dummy)
|
||||||
{
|
{
|
||||||
@ -3696,7 +3696,7 @@ meta_keybindings_switch_window (MetaDisplay *display,
|
|||||||
static void
|
static void
|
||||||
init_builtin_key_bindings (MetaDisplay *display)
|
init_builtin_key_bindings (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
#define REVERSES_AND_REVERSED (META_KEY_BINDING_REVERSES | \
|
#define REVERSES_AND_REVERSED (META_KEY_BINDING_REVERSES | \
|
||||||
META_KEY_BINDING_IS_REVERSED)
|
META_KEY_BINDING_IS_REVERSED)
|
||||||
GSettings *common_keybindings = g_settings_new (SCHEMA_COMMON_KEYBINDINGS);
|
GSettings *common_keybindings = g_settings_new (SCHEMA_COMMON_KEYBINDINGS);
|
||||||
GSettings *mutter_keybindings = g_settings_new (SCHEMA_MUTTER_KEYBINDINGS);
|
GSettings *mutter_keybindings = g_settings_new (SCHEMA_MUTTER_KEYBINDINGS);
|
||||||
@ -3912,11 +3912,11 @@ init_builtin_key_bindings (MetaDisplay *display)
|
|||||||
handle_cycle, META_TAB_LIST_DOCKS);
|
handle_cycle, META_TAB_LIST_DOCKS);
|
||||||
|
|
||||||
|
|
||||||
/* These two are special pseudo-bindings that are provided for allowing
|
/* These two are special pseudo-bindings that are provided for allowing
|
||||||
* custom handlers, but will never be bound to a key. While a tab
|
* custom handlers, but will never be bound to a key. While a tab
|
||||||
* grab is in effect, they are invoked for releasing the primary modifier
|
* grab is in effect, they are invoked for releasing the primary modifier
|
||||||
* or pressing some unbound key, respectively.
|
* or pressing some unbound key, respectively.
|
||||||
*/
|
*/
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"tab-popup-select",
|
"tab-popup-select",
|
||||||
mutter_keybindings,
|
mutter_keybindings,
|
||||||
@ -3931,7 +3931,7 @@ init_builtin_key_bindings (MetaDisplay *display)
|
|||||||
META_KEYBINDING_ACTION_TAB_POPUP_CANCEL,
|
META_KEYBINDING_ACTION_TAB_POPUP_CANCEL,
|
||||||
handle_tab_popup_cancel, 0);
|
handle_tab_popup_cancel, 0);
|
||||||
|
|
||||||
/***********************************/
|
/***********************************/
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"show-desktop",
|
"show-desktop",
|
||||||
@ -3963,11 +3963,11 @@ init_builtin_key_bindings (MetaDisplay *display)
|
|||||||
|
|
||||||
#undef REVERSES_AND_REVERSED
|
#undef REVERSES_AND_REVERSED
|
||||||
|
|
||||||
/************************ PER WINDOW BINDINGS ************************/
|
/************************ PER WINDOW BINDINGS ************************/
|
||||||
|
|
||||||
/* These take a window as an extra parameter; they have no effect
|
/* These take a window as an extra parameter; they have no effect
|
||||||
* if no window is active.
|
* if no window is active.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"activate-window-menu",
|
"activate-window-menu",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user