[mutter/wip/thing] Remove tabpopup and friends
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/thing] Remove tabpopup and friends
- Date: Thu, 27 Feb 2014 20:25:48 +0000 (UTC)
commit 9e51d98f4ac81e751bc53a3b1b34cbd815b83cd9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 23 12:52:25 2013 -0400
Remove tabpopup and friends
These are unused in gnome-shell, and add complexity. Remove them.
src/Makefile.am | 4 -
src/core/display.c | 52 ---
src/core/keybindings.c | 884 +----------------------------------------
src/core/prefs.c | 32 --
src/core/screen-private.h | 17 -
src/core/screen.c | 250 ------------
src/meta/common.h | 15 -
src/meta/prefs.h | 9 -
src/ui/draw-workspace.c | 224 -----------
src/ui/draw-workspace.h | 59 ---
src/ui/tabpopup.c | 963 ---------------------------------------------
src/ui/tabpopup.h | 65 ---
src/ui/ui.h | 2 -
13 files changed, 9 insertions(+), 2567 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4764814..2221a5d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,8 +113,6 @@ libmutter_wayland_la_SOURCES = \
core/display.c \
core/display-private.h \
meta/display.h \
- ui/draw-workspace.c \
- ui/draw-workspace.h \
core/edge-resistance.c \
core/edge-resistance.h \
core/edid-parse.c \
@@ -185,8 +183,6 @@ libmutter_wayland_la_SOURCES = \
ui/metaaccellabel.h \
ui/resizepopup.c \
ui/resizepopup.h \
- ui/tabpopup.c \
- ui/tabpopup.h \
ui/theme-parser.c \
ui/theme.c \
meta/theme.h \
diff --git a/src/core/display.c b/src/core/display.c
index 778f54d..b3d21d4 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -75,14 +75,6 @@
#include "meta-xwayland-private.h"
#include "meta-surface-actor-wayland.h"
-#define GRAB_OP_IS_WINDOW_SWITCH(g) \
- (g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
- g == META_GRAB_OP_KEYBOARD_TABBING_DOCK || \
- g == META_GRAB_OP_KEYBOARD_TABBING_GROUP || \
- g == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL || \
- g == META_GRAB_OP_KEYBOARD_ESCAPING_DOCK || \
- g == META_GRAB_OP_KEYBOARD_ESCAPING_GROUP)
-
/*
* SECTION:pings
*
@@ -1375,13 +1367,6 @@ grab_op_is_keyboard (MetaGrabOp op)
case META_GRAB_OP_KEYBOARD_RESIZING_NE:
case META_GRAB_OP_KEYBOARD_RESIZING_SW:
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
- case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
- case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
- case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
- case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
- case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
- case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
- case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
case META_GRAB_OP_COMPOSITOR:
return TRUE;
@@ -2076,19 +2061,6 @@ meta_display_handle_event (MetaDisplay *display,
(display->grab_window ?
display->grab_window->desc :
"none"));
- if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
- {
- meta_topic (META_DEBUG_WINDOW_OPS,
- "Syncing to old stack positions.\n");
-
- /* XXX: I'm not sure if this is the right thing to do.
- The pre-Wayland code was only calling
- meta_stack_set_positions if the modified window was a
- root window */
- if (event->any.source == CLUTTER_ACTOR (event->any.stage) && window && window->screen)
- meta_stack_set_positions (window->screen->stack,
- display->grab_old_window_stacking);
- }
meta_display_end_grab_op (display, event->any.time);
bypass_clutter = TRUE;
bypass_wayland = TRUE;
@@ -4084,16 +4056,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
g_assert (display->grab_window != NULL || display->grab_screen != NULL);
g_assert (display->grab_op != META_GRAB_OP_NONE);
- /* Save the old stacking */
- if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
- {
- meta_topic (META_DEBUG_WINDOW_OPS,
- "Saving old stack positions; old pointer was %p.\n",
- display->grab_old_window_stacking);
- display->grab_old_window_stacking =
- meta_stack_get_positions (screen->stack);
- }
-
if (display->grab_window)
{
meta_window_refresh_resize_popup (display->grab_window);
@@ -4135,20 +4097,6 @@ meta_display_end_grab_op (MetaDisplay *display,
if (!display->grab_threshold_movement_reached)
meta_window_raise (display->grab_window);
}
-
- if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op) ||
- display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING)
- {
- if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
- meta_screen_tab_popup_destroy (display->grab_screen);
- else
- meta_screen_workspace_popup_destroy (display->grab_screen);
-
- /* If the ungrab here causes an EnterNotify, ignore it for
- * sloppy focus
- */
- display->ungrab_should_not_cause_focus_window = display->grab_xwindow;
- }
/* If this was a move or resize clear out the edge cache */
if (meta_grab_op_is_resizing (display->grab_op) ||
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index bf33587..96c3402 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -110,13 +110,6 @@ meta_key_binding_is_builtin (MetaKeyBinding *binding)
* handler functions and have some kind of flag to say they're unbindable.
*/
-static void handle_workspace_switch (MetaDisplay *display,
- MetaScreen *screen,
- MetaWindow *window,
- ClutterKeyEvent *event,
- MetaKeyBinding *binding,
- gpointer dummy);
-
static gboolean process_mouse_move_resize_grab (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
@@ -132,18 +125,9 @@ static gboolean process_keyboard_resize_grab (MetaDisplay *display,
MetaWindow *window,
ClutterKeyEvent *event);
-static gboolean process_tab_grab (MetaDisplay *display,
- MetaScreen *screen,
- ClutterKeyEvent *event);
-
-static gboolean process_workspace_switch_grab (MetaDisplay *display,
- MetaScreen *screen,
- ClutterKeyEvent *event);
-
static void grab_key_bindings (MetaDisplay *display);
static void ungrab_key_bindings (MetaDisplay *display);
-
static GHashTable *key_handlers;
static GHashTable *external_grabs;
@@ -1664,140 +1648,6 @@ is_modifier (MetaDisplay *display,
return retval;
}
-/* Indexes:
- * shift = 0
- * lock = 1
- * control = 2
- * mod1 = 3
- * mod2 = 4
- * mod3 = 5
- * mod4 = 6
- * mod5 = 7
- */
-
-static gboolean
-is_specific_modifier (MetaDisplay *display,
- unsigned int keycode,
- unsigned int mask)
-{
- int i;
- int end;
- gboolean retval = FALSE;
- int mod_index;
-
- g_assert (display->modmap);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Checking whether code 0x%x is bound to modifier 0x%x\n",
- keycode, mask);
-
- mod_index = 0;
- mask = mask >> 1;
- while (mask != 0)
- {
- mod_index += 1;
- mask = mask >> 1;
- }
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Modifier has index %d\n", mod_index);
-
- end = (mod_index + 1) * display->modmap->max_keypermod;
- i = mod_index * display->modmap->max_keypermod;
- while (i < end)
- {
- if (keycode == display->modmap->modifiermap[i])
- {
- retval = TRUE;
- break;
- }
- ++i;
- }
-
- return retval;
-}
-
-static unsigned int
-get_primary_modifier (MetaDisplay *display,
- unsigned int entire_binding_mask)
-{
- /* The idea here is to see if the "main" modifier
- * for Alt+Tab has been pressed/released. So if the binding
- * is Alt+Shift+Tab then releasing Alt is the thing that
- * ends the operation. It's pretty random how we order
- * these.
- */
- unsigned int masks[] = { Mod5Mask, Mod4Mask, Mod3Mask,
- Mod2Mask, Mod1Mask, ControlMask,
- ShiftMask, LockMask };
-
- int i;
-
- i = 0;
- while (i < (int) G_N_ELEMENTS (masks))
- {
- if (entire_binding_mask & masks[i])
- return masks[i];
- ++i;
- }
-
- return 0;
-}
-
-static gboolean
-keycode_is_primary_modifier (MetaDisplay *display,
- unsigned int keycode,
- unsigned int entire_binding_mask)
-{
- unsigned int primary_modifier;
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Checking whether code 0x%x is the primary modifier of mask 0x%x\n",
- keycode, entire_binding_mask);
-
- primary_modifier = get_primary_modifier (display, entire_binding_mask);
- if (primary_modifier != 0)
- return is_specific_modifier (display, keycode, primary_modifier);
- else
- return FALSE;
-}
-
-static gboolean
-primary_modifier_still_pressed (MetaDisplay *display,
- unsigned int entire_binding_mask)
-{
- unsigned int primary_modifier;
- double x, y, root_x, root_y;
- Window root, child;
- XIButtonState buttons;
- XIModifierState mods;
- XIGroupState group;
- MetaScreen *random_screen;
- Window random_xwindow;
-
- primary_modifier = get_primary_modifier (display, entire_binding_mask);
-
- random_screen = display->screens->data;
- random_xwindow = random_screen->no_focus_window;
- XIQueryPointer (display->xdisplay,
- META_VIRTUAL_CORE_POINTER_ID,
- random_xwindow, /* some random window */
- &root, &child,
- &root_x, &root_y,
- &x, &y,
- &buttons, &mods, &group);
- free (buttons.mask);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
- primary_modifier, entire_binding_mask, mods.effective);
-
- if ((mods.effective & primary_modifier) == 0)
- return FALSE;
- else
- return TRUE;
-}
-
static void
invoke_handler (MetaDisplay *display,
MetaScreen *screen,
@@ -1822,20 +1672,6 @@ invoke_handler (MetaDisplay *display,
NULL);
}
-static void
-invoke_handler_by_name (MetaDisplay *display,
- MetaScreen *screen,
- const char *handler_name,
- MetaWindow *window,
- ClutterKeyEvent *event)
-{
- MetaKeyHandler *handler;
-
- handler = HANDLER (handler_name);
- if (handler)
- invoke_handler (display, screen, handler, window, event, NULL);
-}
-
static gboolean
process_event (MetaKeyBinding *bindings,
int n_bindings,
@@ -2119,23 +1955,6 @@ meta_display_process_key_event (MetaDisplay *display,
keep_grab = process_keyboard_resize_grab (display, screen, window, event);
break;
- case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
- case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
- case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
- case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
- case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
- case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Processing event for keyboard tabbing/cycling\n");
- keep_grab = process_tab_grab (display, screen, event);
- break;
-
- case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Processing event for keyboard workspace switching\n");
- keep_grab = process_workspace_switch_grab (display, screen, event);
- break;
-
default:
break;
}
@@ -2674,347 +2493,6 @@ process_keyboard_resize_grab (MetaDisplay *display,
return handled;
}
-static gboolean
-end_keyboard_grab (MetaDisplay *display,
- unsigned int keycode)
-{
-#ifdef HAVE_XKB
- if (display->xkb_base_event_type > 0)
- {
- unsigned int primary_modifier;
- XkbStateRec state;
-
- primary_modifier = get_primary_modifier (display, display->grab_mask);
-
- XkbGetState (display->xdisplay, XkbUseCoreKbd, &state);
-
- if (!(primary_modifier & state.mods))
- return TRUE;
- }
- else
-#endif
- {
- if (keycode_is_primary_modifier (display, keycode, display->grab_mask))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-process_tab_grab (MetaDisplay *display,
- MetaScreen *screen,
- ClutterKeyEvent *event)
-{
- MetaKeyBinding *binding;
- MetaKeyBindingAction action;
- gboolean popup_not_showing;
- gboolean backward;
- gboolean key_used;
- MetaWindow *prev_window;
-
- if (screen != display->grab_screen)
- return FALSE;
-
- binding = display_get_keybinding (display,
- event->keyval,
- event->hardware_keycode,
- display->grab_mask);
- if (binding)
- action = meta_prefs_get_keybinding_action (binding->name);
- else
- action = META_KEYBINDING_ACTION_NONE;
-
- /*
- * If there is no tab_pop up object, i.e., there is some custom handler
- * implementing Alt+Tab & Co., we call this custom handler; we do not
- * mess about with the grab, as that is up to the handler to deal with.
- */
- if (!screen->tab_popup)
- {
- if (event->type == CLUTTER_KEY_RELEASE)
- {
- if (end_keyboard_grab (display, event->hardware_keycode))
- {
- invoke_handler_by_name (display, screen, "tab-popup-select", NULL, event);
-
- /* We return FALSE to end the grab; if the handler ended the grab itself
- * that will be a noop. If the handler didn't end the grab, then it's a
- * safety measure to prevent a stuck grab.
- */
- return FALSE;
- }
-
- return TRUE;
- }
-
- switch (action)
- {
- case META_KEYBINDING_ACTION_CYCLE_PANELS:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS:
- case META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_PANELS:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS:
- case META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD:
- case META_KEYBINDING_ACTION_CYCLE_GROUP:
- case META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_GROUP:
- case META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD:
- /* These are the tab-popup bindings. If a custom Alt-Tab implementation
- * is in effect, we expect it to want to handle all of these as a group
- *
- * If there are some of them that the custom implementation didn't
- * handle, we treat them as "unbound" for the duration - running the
- * normal handlers could get us into trouble.
- */
- if (binding->handler &&
- binding->handler->func &&
- binding->handler->func != binding->handler->default_func)
- {
- invoke_handler (display, screen, binding->handler, NULL, event, binding);
- return TRUE;
- }
- break;
- case META_KEYBINDING_ACTION_NONE:
- {
- /*
- * If this is simply user pressing the Shift key, we do not want
- * to cancel the grab.
- */
- if (is_modifier (display, event->hardware_keycode))
- return TRUE;
- }
-
- default:
- break;
- }
-
- /* Some unhandled key press */
- invoke_handler_by_name (display, screen, "tab-popup-cancel", NULL, event);
- return FALSE;
- }
-
- if (event->type == CLUTTER_KEY_RELEASE &&
- end_keyboard_grab (display, event->hardware_keycode))
- {
- /* We're done, move to the new window. */
- MetaWindow *target_window;
-
- target_window = meta_screen_tab_popup_get_selected (screen);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending tab operation, primary modifier released\n");
-
- if (target_window)
- {
- target_window->tab_unminimized = FALSE;
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Activating target window\n");
-
- meta_topic (META_DEBUG_FOCUS, "Activating %s due to tab popup "
- "selection and turning mouse_mode off\n",
- target_window->desc);
- display->mouse_mode = FALSE;
- meta_window_activate (target_window, event->time);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending grab early so we can focus the target window\n");
- meta_display_end_grab_op (display, event->time);
-
- return TRUE; /* we already ended the grab */
- }
-
- return FALSE; /* end grab */
- }
-
- /* don't care about other releases, but eat them, don't end grab */
- if (event->type == CLUTTER_KEY_RELEASE)
- return TRUE;
-
- /* don't end grab on modifier key presses */
- if (is_modifier (display, event->hardware_keycode))
- return TRUE;
-
- prev_window = meta_screen_tab_popup_get_selected (screen);
-
- /* Cancel when alt-Escape is pressed during using alt-Tab, and vice
- * versa.
- */
- switch (action)
- {
- case META_KEYBINDING_ACTION_CYCLE_PANELS:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS:
- case META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD:
- /* CYCLE_* are traditionally Escape-based actions,
- * and should cancel traditionally Tab-based ones.
- */
- switch (display->grab_op)
- {
- case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
- case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
- /* carry on */
- break;
- default:
- return FALSE;
- }
- break;
- case META_KEYBINDING_ACTION_SWITCH_PANELS:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS:
- case META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD:
- /* SWITCH_* are traditionally Tab-based actions,
- * and should cancel traditionally Escape-based ones.
- */
- switch (display->grab_op)
- {
- case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
- case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
- /* carry on */
- break;
- default:
- /* Also, we must re-lower and re-minimize whatever window
- * we'd previously raised and unminimized.
- */
- meta_stack_set_positions (screen->stack,
- screen->display->grab_old_window_stacking);
- if (prev_window && prev_window->tab_unminimized)
- {
- meta_window_minimize (prev_window);
- prev_window->tab_unminimized = FALSE;
- }
- return FALSE;
- }
- break;
- case META_KEYBINDING_ACTION_CYCLE_GROUP:
- case META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_GROUP:
- case META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD:
- switch (display->grab_op)
- {
- case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
- case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
- /* carry on */
- break;
- default:
- return FALSE;
- }
-
- break;
- default:
- break;
- }
-
- /* !! TO HERE !!
- * alt-f6 during alt-{Tab,Escape} does not end the grab
- * but does change the grab op (and redraws the window,
- * of course).
- * See _{SWITCH,CYCLE}_GROUP.@@@
- */
-
- popup_not_showing = FALSE;
- key_used = FALSE;
- backward = FALSE;
-
- switch (action)
- {
- case META_KEYBINDING_ACTION_CYCLE_PANELS:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS:
- case META_KEYBINDING_ACTION_CYCLE_GROUP:
- popup_not_showing = TRUE;
- key_used = TRUE;
- break;
- case META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD:
- case META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD:
- popup_not_showing = TRUE;
- key_used = TRUE;
- backward = TRUE;
- break;
- case META_KEYBINDING_ACTION_SWITCH_PANELS:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS:
- case META_KEYBINDING_ACTION_SWITCH_GROUP:
- key_used = TRUE;
- break;
- case META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD:
- case META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD:
- key_used = TRUE;
- backward = TRUE;
- break;
- default:
- break;
- }
-
- if (key_used)
- {
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Key pressed, moving tab focus in popup\n");
-
- if (event->modifier_state & CLUTTER_SHIFT_MASK)
- backward = !backward;
-
- if (backward)
- meta_screen_tab_popup_backward (screen);
- else
- meta_screen_tab_popup_forward (screen);
-
- if (popup_not_showing)
- {
- /* We can't actually change window focus, due to the grab.
- * but raise the window.
- */
- MetaWindow *target_window;
-
- meta_stack_set_positions (screen->stack,
- display->grab_old_window_stacking);
-
- target_window = meta_screen_tab_popup_get_selected (screen);
-
- if (prev_window && prev_window->tab_unminimized)
- {
- prev_window->tab_unminimized = FALSE;
- meta_window_minimize (prev_window);
- }
-
- if (target_window)
- {
- meta_window_raise (target_window);
- target_window->tab_unminimized = target_window->minimized;
- meta_window_unminimize (target_window);
- }
- }
- }
- else
- {
- /* end grab */
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending tabbing/cycling, uninteresting key pressed\n");
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Syncing to old stack positions.\n");
- meta_stack_set_positions (screen->stack,
- screen->display->grab_old_window_stacking);
-
- if (prev_window && prev_window->tab_unminimized)
- {
- meta_window_minimize (prev_window);
- prev_window->tab_unminimized = FALSE;
- }
- }
-
- return key_used;
-}
-
static void
handle_switch_to_workspace (MetaDisplay *display,
MetaScreen *screen,
@@ -3026,23 +2504,6 @@ handle_switch_to_workspace (MetaDisplay *display,
gint which = binding->handler->data;
MetaWorkspace *workspace;
- if (which < 0)
- {
- /* Negative workspace numbers are directions with respect to the
- * current workspace. While we could insta-switch here by setting
- * workspace to the result of meta_workspace_get_neighbor(), when
- * people request a workspace switch to the left or right via
- * the keyboard, they actually want a tab popup. So we should
- * go there instead.
- *
- * Note that we're the only caller of that function, so perhaps
- * we should merge with it.
- */
- handle_workspace_switch (display, screen, event_window, event, binding,
- dummy);
- return;
- }
-
workspace = meta_screen_get_workspace_by_index (screen, which);
if (workspace)
@@ -3267,119 +2728,6 @@ handle_move_to_center (MetaDisplay *display,
window->rect.height);
}
-static gboolean
-process_workspace_switch_grab (MetaDisplay *display,
- MetaScreen *screen,
- ClutterKeyEvent *event)
-{
- MetaWorkspace *workspace;
-
- if (screen != display->grab_screen || !screen->ws_popup)
- return FALSE;
-
- if (event->type == CLUTTER_KEY_RELEASE &&
- end_keyboard_grab (display, event->hardware_keycode))
- {
- /* We're done, move to the new workspace. */
- MetaWorkspace *target_workspace;
-
- target_workspace = meta_screen_workspace_popup_get_selected (screen);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending workspace tab operation, primary modifier released\n");
-
- if (target_workspace == screen->active_workspace)
- {
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending grab so we can focus on the target workspace\n");
- meta_display_end_grab_op (display, event->time);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Focusing default window on target workspace\n");
-
- meta_workspace_focus_default_window (target_workspace,
- NULL,
- event->time);
-
- return TRUE; /* we already ended the grab */
- }
-
- /* Workspace switching should have already occurred on KeyPress */
- meta_warning ("target_workspace != active_workspace. Some other event must have occurred.\n");
-
- return FALSE; /* end grab */
- }
-
- /* don't care about other releases, but eat them, don't end grab */
- if (event->type == CLUTTER_KEY_RELEASE)
- return TRUE;
-
- /* don't end grab on modifier key presses */
- if (is_modifier (display, event->hardware_keycode))
- return TRUE;
-
- /* select the next workspace in the popup */
- workspace = meta_screen_workspace_popup_get_selected (screen);
-
- if (workspace)
- {
- MetaWorkspace *target_workspace;
- MetaKeyBindingAction action;
-
- action = meta_display_get_keybinding_action (display,
- event->hardware_keycode,
- display->grab_mask);
-
- switch (action)
- {
- case META_KEYBINDING_ACTION_WORKSPACE_UP:
- target_workspace = meta_workspace_get_neighbor (workspace,
- META_MOTION_UP);
- break;
-
- case META_KEYBINDING_ACTION_WORKSPACE_DOWN:
- target_workspace = meta_workspace_get_neighbor (workspace,
- META_MOTION_DOWN);
- break;
-
- case META_KEYBINDING_ACTION_WORKSPACE_LEFT:
- target_workspace = meta_workspace_get_neighbor (workspace,
- META_MOTION_LEFT);
- break;
-
- case META_KEYBINDING_ACTION_WORKSPACE_RIGHT:
- target_workspace = meta_workspace_get_neighbor (workspace,
- META_MOTION_RIGHT);
- break;
-
- default:
- target_workspace = NULL;
- break;
- }
-
- if (target_workspace)
- {
- meta_screen_workspace_popup_select (screen, target_workspace);
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Tab key pressed, moving tab focus in popup\n");
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Activating target workspace\n");
-
- meta_workspace_activate (target_workspace, event->time);
-
- return TRUE; /* we already ended the grab */
- }
- }
-
- /* end grab */
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Ending workspace tabbing & focusing default window; uninteresting key pressed\n");
- workspace = meta_screen_workspace_popup_get_selected (screen);
- meta_workspace_focus_default_window (workspace, NULL, event->time);
- return FALSE;
-}
-
static void
handle_show_desktop (MetaDisplay *display,
MetaScreen *screen,
@@ -3476,60 +2824,19 @@ handle_activate_window_menu (MetaDisplay *display,
}
}
-static MetaGrabOp
-tab_op_from_tab_type (MetaTabList type)
-{
- switch (type)
- {
- case META_TAB_LIST_NORMAL:
- return META_GRAB_OP_KEYBOARD_TABBING_NORMAL;
- case META_TAB_LIST_DOCKS:
- return META_GRAB_OP_KEYBOARD_TABBING_DOCK;
- case META_TAB_LIST_GROUP:
- return META_GRAB_OP_KEYBOARD_TABBING_GROUP;
- case META_TAB_LIST_NORMAL_ALL:
- break;
- }
-
- g_assert_not_reached ();
-
- return 0;
-}
-
-static MetaGrabOp
-cycle_op_from_tab_type (MetaTabList type)
-{
- switch (type)
- {
- case META_TAB_LIST_NORMAL:
- return META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL;
- case META_TAB_LIST_DOCKS:
- return META_GRAB_OP_KEYBOARD_ESCAPING_DOCK;
- case META_TAB_LIST_GROUP:
- return META_GRAB_OP_KEYBOARD_ESCAPING_GROUP;
- case META_TAB_LIST_NORMAL_ALL:
- break;
- }
-
- g_assert_not_reached ();
-
- return 0;
-}
-
static void
do_choose_window (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *event_window,
ClutterKeyEvent *event,
MetaKeyBinding *binding,
- gboolean backward,
- gboolean show_popup)
+ gboolean backward)
{
MetaTabList type = binding->handler->data;
MetaWindow *initial_selection;
meta_topic (META_DEBUG_KEYBINDINGS,
- "Tab list = %u show_popup = %d\n", type, show_popup);
+ "Tab list = %u\n", type);
/* reverse direction if shift is down */
if (event->modifier_state & CLUTTER_SHIFT_MASK)
@@ -3542,82 +2849,7 @@ do_choose_window (MetaDisplay *display,
NULL,
backward);
- /* Note that focus_window may not be in the tab chain, but it's OK */
- if (initial_selection == NULL)
- initial_selection = meta_display_get_tab_current (display,
- type, screen,
- screen->active_workspace);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Initially selecting window %s\n",
- initial_selection ? initial_selection->desc : "(none)");
-
- if (initial_selection == NULL)
- return;
-
- if (binding->mask == 0)
- {
- /* If no modifiers, we can't do the "hold down modifier to keep
- * moving" thing, so we just instaswitch by one window.
- */
- meta_topic (META_DEBUG_FOCUS,
- "Activating %s and turning off mouse_mode due to "
- "switch/cycle windows with no modifiers\n",
- initial_selection->desc);
- display->mouse_mode = FALSE;
- meta_window_activate (initial_selection, event->time);
- return;
- }
-
- if (meta_prefs_get_no_tab_popup ())
- {
- /* FIXME? Shouldn't this be merged with the previous case? */
- return;
- }
-
- if (!meta_display_begin_grab_op (display,
- screen,
- NULL,
- show_popup ?
- tab_op_from_tab_type (type) :
- cycle_op_from_tab_type (type),
- FALSE,
- FALSE,
- 0,
- binding->mask,
- event->time,
- 0, 0))
- return;
-
- if (!primary_modifier_still_pressed (display, binding->mask))
- {
- /* This handles a race where modifier might be released before
- * we establish the grab. must end grab prior to trying to focus
- * a window.
- */
- meta_topic (META_DEBUG_FOCUS,
- "Ending grab, activating %s, and turning off "
- "mouse_mode due to switch/cycle windows where "
- "modifier was released prior to grab\n",
- initial_selection->desc);
- meta_display_end_grab_op (display, event->time);
- display->mouse_mode = FALSE;
- meta_window_activate (initial_selection, event->time);
- return;
- }
-
- meta_screen_tab_popup_create (screen, type,
- show_popup ? META_TAB_SHOW_ICON :
- META_TAB_SHOW_INSTANTLY,
- initial_selection);
-
- if (!show_popup)
- {
- meta_window_raise (initial_selection);
- initial_selection->tab_unminimized =
- initial_selection->minimized;
- meta_window_unminimize (initial_selection);
- }
+ meta_window_activate (initial_selection, event->time);
}
static void
@@ -3629,9 +2861,7 @@ handle_switch (MetaDisplay *display,
gpointer dummy)
{
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
-
- do_choose_window (display, screen, event_window, event, binding,
- backwards, TRUE);
+ do_choose_window (display, screen, event_window, event, binding, backwards);
}
static void
@@ -3643,31 +2873,7 @@ handle_cycle (MetaDisplay *display,
gpointer dummy)
{
gint backwards = (binding->handler->flags & META_KEY_BINDING_IS_REVERSED) != 0;
-
- do_choose_window (display, screen, event_window, event, binding,
- backwards, FALSE);
-}
-
-static void
-handle_tab_popup_select (MetaDisplay *display,
- MetaScreen *screen,
- MetaWindow *window,
- ClutterKeyEvent *event,
- MetaKeyBinding *binding,
- gpointer dummy)
-{
- /* Stub for custom handlers; no default implementation */
-}
-
-static void
-handle_tab_popup_cancel (MetaDisplay *display,
- MetaScreen *screen,
- MetaWindow *window,
- ClutterKeyEvent *event,
- MetaKeyBinding *binding,
- gpointer dummy)
-{
- /* Stub for custom handlers; no default implementation */
+ do_choose_window (display, screen, event_window, event, binding, backwards);
}
static void
@@ -4015,58 +3221,6 @@ handle_lower (MetaDisplay *display,
}
static void
-handle_workspace_switch (MetaDisplay *display,
- MetaScreen *screen,
- MetaWindow *window,
- ClutterKeyEvent *event,
- MetaKeyBinding *binding,
- gpointer dummy)
-{
- gint motion = binding->handler->data;
- MetaWorkspace *next;
- gboolean grabbed_before_release;
-
- g_assert (motion < 0);
-
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Starting tab between workspaces, showing popup\n");
-
- if (!meta_display_begin_grab_op (display,
- screen,
- NULL,
- META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
- FALSE,
- FALSE,
- 0,
- event->modifier_state,
- event->time,
- 0, 0))
- return;
-
- next = meta_workspace_get_neighbor (screen->active_workspace, motion);
- g_assert (next);
-
- grabbed_before_release = primary_modifier_still_pressed (display, event->modifier_state);
-
- meta_topic (META_DEBUG_KEYBINDINGS, "Activating target workspace\n");
-
- if (!grabbed_before_release)
- {
- /* end the grab right away, modifier possibly released
- * before we could establish the grab and receive the
- * release event. Must end grab before we can switch
- * spaces.
- */
- meta_display_end_grab_op (display, event->time);
- }
-
- meta_workspace_activate (next, event->time);
-
- if (grabbed_before_release && !meta_prefs_get_no_tab_popup ())
- meta_screen_workspace_popup_create (screen, next);
-}
-
-static void
handle_set_spew_mark (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
@@ -4217,28 +3371,28 @@ init_builtin_key_bindings (MetaDisplay *display)
common_keybindings,
META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_WORKSPACE_LEFT,
- handle_switch_to_workspace, META_MOTION_LEFT);
+ NULL, 0);
add_builtin_keybinding (display,
"switch-to-workspace-right",
common_keybindings,
META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_WORKSPACE_RIGHT,
- handle_switch_to_workspace, META_MOTION_RIGHT);
+ NULL, 0);
add_builtin_keybinding (display,
"switch-to-workspace-up",
common_keybindings,
META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_WORKSPACE_UP,
- handle_switch_to_workspace, META_MOTION_UP);
+ NULL, 0);
add_builtin_keybinding (display,
"switch-to-workspace-down",
common_keybindings,
META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_WORKSPACE_DOWN,
- handle_switch_to_workspace, META_MOTION_DOWN);
+ NULL, 0);
/* The ones which have inverses. These can't be bound to any keystroke
@@ -4349,26 +3503,6 @@ init_builtin_key_bindings (MetaDisplay *display)
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
handle_cycle, META_TAB_LIST_DOCKS);
-
- /* These two are special pseudo-bindings that are provided for allowing
- * 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
- * or pressing some unbound key, respectively.
- */
- add_builtin_keybinding (display,
- "tab-popup-select",
- mutter_keybindings,
- META_KEY_BINDING_NONE,
- META_KEYBINDING_ACTION_TAB_POPUP_SELECT,
- handle_tab_popup_select, 0);
-
- add_builtin_keybinding (display,
- "tab-popup-cancel",
- mutter_keybindings,
- META_KEY_BINDING_NONE,
- META_KEYBINDING_ACTION_TAB_POPUP_CANCEL,
- handle_tab_popup_cancel, 0);
-
/***********************************/
add_builtin_keybinding (display,
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 7534210..80db6f3 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -57,7 +57,6 @@
#define KEY_OVERLAY_KEY "overlay-key"
#define KEY_WORKSPACES_ONLY_ON_PRIMARY "workspaces-only-on-primary"
-#define KEY_NO_TAB_POPUP "no-tab-popup"
/* These are the different schemas we are keeping
* a GSettings instance for */
@@ -112,8 +111,6 @@ static char **workspace_names = NULL;
static gboolean workspaces_only_on_primary = FALSE;
-static gboolean no_tab_popup = FALSE;
-
static char *iso_next_group_option = NULL;
static void handle_preference_update_enum (GSettings *settings,
@@ -366,13 +363,6 @@ static MetaBoolPreference preferences_bool[] =
&workspaces_only_on_primary,
},
{
- { KEY_NO_TAB_POPUP,
- SCHEMA_MUTTER,
- META_PREF_NO_TAB_POPUP,
- },
- &no_tab_popup,
- },
- {
{ "auto-maximize",
SCHEMA_MUTTER,
META_PREF_AUTO_MAXIMIZE,
@@ -1813,9 +1803,6 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_WORKSPACES_ONLY_ON_PRIMARY:
return "WORKSPACES_ONLY_ON_PRIMARY";
- case META_PREF_NO_TAB_POPUP:
- return "NO_TAB_POPUP";
-
case META_PREF_DRAGGABLE_BORDER_WIDTH:
return "DRAGGABLE_BORDER_WIDTH";
@@ -2320,25 +2307,6 @@ meta_prefs_get_workspaces_only_on_primary (void)
return workspaces_only_on_primary;
}
-
-gboolean
-meta_prefs_get_no_tab_popup (void)
-{
- return no_tab_popup;
-}
-
-void
-meta_prefs_set_no_tab_popup (gboolean whether)
-{
- MetaBasePreference *pref;
-
- if (find_pref (preferences_bool, sizeof(MetaBoolPreference),
- KEY_NO_TAB_POPUP, &pref))
- {
- g_settings_set_boolean (SETTINGS (pref->schema), KEY_NO_TAB_POPUP, whether);
- }
-}
-
int
meta_prefs_get_draggable_border_width (void)
{
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 2d9c317..427bda2 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -64,7 +64,6 @@ struct _MetaScreen
Visual *default_xvisual;
MetaRectangle rect; /* Size of screen; rect.x & rect.y are always 0 */
MetaUI *ui;
- MetaTabPopup *tab_popup, *ws_popup;
guint tile_preview_timeout_id;
@@ -150,22 +149,6 @@ void meta_screen_foreach_window (MetaScreen *scree
void meta_screen_update_cursor (MetaScreen *screen);
-void meta_screen_tab_popup_create (MetaScreen *screen,
- MetaTabList list_type,
- MetaTabShowType show_type,
- MetaWindow *initial_window);
-void meta_screen_tab_popup_forward (MetaScreen *screen);
-void meta_screen_tab_popup_backward (MetaScreen *screen);
-MetaWindow* meta_screen_tab_popup_get_selected (MetaScreen *screen);
-void meta_screen_tab_popup_destroy (MetaScreen *screen);
-
-void meta_screen_workspace_popup_create (MetaScreen *screen,
- MetaWorkspace *initial_selection);
-void meta_screen_workspace_popup_select (MetaScreen *screen,
- MetaWorkspace *workspace);
-MetaWorkspace*meta_screen_workspace_popup_get_selected (MetaScreen *screen);
-void meta_screen_workspace_popup_destroy (MetaScreen *screen);
-
void meta_screen_update_tile_preview (MetaScreen *screen,
gboolean delay);
void meta_screen_hide_tile_preview (MetaScreen *screen);
diff --git a/src/core/screen.c b/src/core/screen.c
index 9df2a8c..d99814b 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -760,9 +760,6 @@ meta_screen_new (MetaDisplay *display,
screen->ui = meta_ui_new (screen->display->xdisplay,
screen->xscreen);
- screen->tab_popup = NULL;
- screen->ws_popup = NULL;
-
screen->tile_preview_timeout_id = 0;
screen->stack = meta_stack_new (screen);
@@ -1428,253 +1425,6 @@ meta_screen_update_cursor (MetaScreen *screen)
screen->current_cursor);
}
-void
-meta_screen_tab_popup_create (MetaScreen *screen,
- MetaTabList list_type,
- MetaTabShowType show_type,
- MetaWindow *initial_selection)
-{
- MetaTabEntry *entries;
- GList *tab_list;
- GList *tmp;
- int len;
- int i;
-
- if (screen->tab_popup)
- return;
-
- tab_list = meta_display_get_tab_list (screen->display,
- list_type,
- screen,
- screen->active_workspace);
-
- len = g_list_length (tab_list);
-
- entries = g_new (MetaTabEntry, len + 1);
- entries[len].key = NULL;
- entries[len].title = NULL;
- entries[len].icon = NULL;
-
- i = 0;
- tmp = tab_list;
- while (i < len)
- {
- MetaWindow *window;
- MetaRectangle r;
-
- window = tmp->data;
-
- entries[i].key = (MetaTabEntryKey) window;
- entries[i].title = window->title;
- entries[i].icon = g_object_ref (window->icon);
- entries[i].blank = FALSE;
- entries[i].hidden = !meta_window_showing_on_its_workspace (window);
- entries[i].demands_attention = window->wm_state_demands_attention;
-
- if (show_type == META_TAB_SHOW_INSTANTLY ||
- !entries[i].hidden ||
- !meta_window_get_icon_geometry (window, &r))
- meta_window_get_frame_rect (window, &r);
-
- entries[i].rect = r;
-
- /* Find inside of highlight rectangle to be used when window is
- * outlined for tabbing. This should be the size of the
- * east/west frame, and the size of the south frame, on those
- * sides. On the top it should be the size of the south frame
- * edge.
- */
-#define OUTLINE_WIDTH 5
- /* Top side */
- if (!entries[i].hidden &&
- window->frame && window->frame->bottom_height > 0 &&
- window->frame->child_y >= window->frame->bottom_height)
- entries[i].inner_rect.y = window->frame->bottom_height;
- else
- entries[i].inner_rect.y = OUTLINE_WIDTH;
-
- /* Bottom side */
- if (!entries[i].hidden &&
- window->frame && window->frame->bottom_height != 0)
- entries[i].inner_rect.height = r.height
- - entries[i].inner_rect.y - window->frame->bottom_height;
- else
- entries[i].inner_rect.height = r.height
- - entries[i].inner_rect.y - OUTLINE_WIDTH;
-
- /* Left side */
- if (!entries[i].hidden && window->frame && window->frame->child_x != 0)
- entries[i].inner_rect.x = window->frame->child_x;
- else
- entries[i].inner_rect.x = OUTLINE_WIDTH;
-
- /* Right side */
- if (!entries[i].hidden &&
- window->frame && window->frame->right_width != 0)
- entries[i].inner_rect.width = r.width
- - entries[i].inner_rect.x - window->frame->right_width;
- else
- entries[i].inner_rect.width = r.width
- - entries[i].inner_rect.x - OUTLINE_WIDTH;
-
- ++i;
- tmp = tmp->next;
- }
-
- if (!meta_prefs_get_no_tab_popup ())
- screen->tab_popup = meta_ui_tab_popup_new (entries,
- screen->number,
- len,
- 5, /* FIXME */
- TRUE);
-
- for (i = 0; i < len; i++)
- g_object_unref (entries[i].icon);
-
- g_free (entries);
-
- g_list_free (tab_list);
-
- meta_ui_tab_popup_select (screen->tab_popup,
- (MetaTabEntryKey) initial_selection);
-
- if (show_type != META_TAB_SHOW_INSTANTLY)
- meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
-}
-
-void
-meta_screen_tab_popup_forward (MetaScreen *screen)
-{
- g_return_if_fail (screen->tab_popup != NULL);
-
- meta_ui_tab_popup_forward (screen->tab_popup);
-}
-
-void
-meta_screen_tab_popup_backward (MetaScreen *screen)
-{
- g_return_if_fail (screen->tab_popup != NULL);
-
- meta_ui_tab_popup_backward (screen->tab_popup);
-}
-
-MetaWindow *
-meta_screen_tab_popup_get_selected (MetaScreen *screen)
-{
- g_return_val_if_fail (screen->tab_popup != NULL, NULL);
-
- return (MetaWindow *) meta_ui_tab_popup_get_selected (screen->tab_popup);
-}
-
-void
-meta_screen_tab_popup_destroy (MetaScreen *screen)
-{
- if (screen->tab_popup)
- {
- meta_ui_tab_popup_free (screen->tab_popup);
- screen->tab_popup = NULL;
- }
-}
-
-void
-meta_screen_workspace_popup_create (MetaScreen *screen,
- MetaWorkspace *initial_selection)
-{
- MetaTabEntry *entries;
- int len;
- int i;
- MetaWorkspaceLayout layout;
- int n_workspaces;
- int current_workspace;
-
- if (screen->ws_popup || meta_prefs_get_no_tab_popup ())
- return;
-
- current_workspace = meta_workspace_index (screen->active_workspace);
- n_workspaces = meta_screen_get_n_workspaces (screen);
-
- meta_screen_calc_workspace_layout (screen, n_workspaces,
- current_workspace, &layout);
-
- len = layout.grid_area;
-
- entries = g_new (MetaTabEntry, len + 1);
- entries[len].key = NULL;
- entries[len].title = NULL;
- entries[len].icon = NULL;
-
- i = 0;
- while (i < len)
- {
- if (layout.grid[i] >= 0)
- {
- MetaWorkspace *workspace;
-
- workspace = meta_screen_get_workspace_by_index (screen,
- layout.grid[i]);
-
- entries[i].key = (MetaTabEntryKey) workspace;
- entries[i].title = meta_workspace_get_name (workspace);
- entries[i].icon = NULL;
- entries[i].blank = FALSE;
-
- g_assert (entries[i].title != NULL);
- }
- else
- {
- entries[i].key = NULL;
- entries[i].title = NULL;
- entries[i].icon = NULL;
- entries[i].blank = TRUE;
- }
- entries[i].hidden = FALSE;
- entries[i].demands_attention = FALSE;
-
- ++i;
- }
-
- screen->ws_popup = meta_ui_tab_popup_new (entries,
- screen->number,
- len,
- layout.cols,
- FALSE);
-
- g_free (entries);
- meta_screen_free_workspace_layout (&layout);
-
- meta_ui_tab_popup_select (screen->ws_popup,
- (MetaTabEntryKey) initial_selection);
- meta_ui_tab_popup_set_showing (screen->ws_popup, TRUE);
-}
-
-void
-meta_screen_workspace_popup_select (MetaScreen *screen,
- MetaWorkspace *workspace)
-{
- g_return_if_fail (screen->ws_popup != NULL);
-
- meta_ui_tab_popup_select (screen->ws_popup,
- (MetaTabEntryKey) workspace);
-}
-
-MetaWorkspace *
-meta_screen_workspace_popup_get_selected (MetaScreen *screen)
-{
- g_return_val_if_fail (screen->ws_popup != NULL, NULL);
-
- return (MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->ws_popup);
-}
-
-void
-meta_screen_workspace_popup_destroy (MetaScreen *screen)
-{
- if (screen->ws_popup)
- {
- meta_ui_tab_popup_free (screen->ws_popup);
- screen->ws_popup = NULL;
- }
-}
-
static gboolean
meta_screen_update_tile_preview_timeout (gpointer data)
{
diff --git a/src/meta/common.h b/src/meta/common.h
index ffccb2d..da9712f 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -214,21 +214,6 @@ typedef enum
META_GRAB_OP_KEYBOARD_RESIZING_SW,
META_GRAB_OP_KEYBOARD_RESIZING_NW,
- /* Alt+Tab */
- META_GRAB_OP_KEYBOARD_TABBING_NORMAL,
- META_GRAB_OP_KEYBOARD_TABBING_DOCK,
-
- /* Alt+Esc */
- META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL,
- META_GRAB_OP_KEYBOARD_ESCAPING_DOCK,
-
- META_GRAB_OP_KEYBOARD_ESCAPING_GROUP,
-
- /* Alt+F6 */
- META_GRAB_OP_KEYBOARD_TABBING_GROUP,
-
- META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
-
/* Frame button ops */
META_GRAB_OP_CLICKING_MINIMIZE,
META_GRAB_OP_CLICKING_MAXIMIZE,
diff --git a/src/meta/prefs.h b/src/meta/prefs.h
index cc07d29..c8cc540 100644
--- a/src/meta/prefs.h
+++ b/src/meta/prefs.h
@@ -62,7 +62,6 @@
* @META_PREF_EDGE_TILING: edge tiling
* @META_PREF_FORCE_FULLSCREEN: force fullscreen
* @META_PREF_WORKSPACES_ONLY_ON_PRIMARY: workspaces only on primary
- * @META_PREF_NO_TAB_POPUP: no tab popup
* @META_PREF_DRAGGABLE_BORDER_WIDTH: draggable border width
* @META_PREF_AUTO_MAXIMIZE: auto-maximize
*/
@@ -100,7 +99,6 @@ typedef enum
META_PREF_EDGE_TILING,
META_PREF_FORCE_FULLSCREEN,
META_PREF_WORKSPACES_ONLY_ON_PRIMARY,
- META_PREF_NO_TAB_POPUP,
META_PREF_DRAGGABLE_BORDER_WIDTH,
META_PREF_AUTO_MAXIMIZE
} MetaPreference;
@@ -163,9 +161,6 @@ void meta_prefs_set_force_fullscreen (gboolean whether);
gboolean meta_prefs_get_workspaces_only_on_primary (void);
-gboolean meta_prefs_get_no_tab_popup (void);
-void meta_prefs_set_no_tab_popup (gboolean whether);
-
int meta_prefs_get_draggable_border_width (void);
gboolean meta_prefs_get_ignore_request_hide_titlebar (void);
@@ -204,8 +199,6 @@ void meta_prefs_set_ignore_request_hide_titlebar (gboolean whether);
* @META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD: FILLME
* @META_KEYBINDING_ACTION_CYCLE_PANELS: FILLME
* @META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD: FILLME
- * @META_KEYBINDING_ACTION_TAB_POPUP_SELECT: FILLME
- * @META_KEYBINDING_ACTION_TAB_POPUP_CANCEL: FILLME
* @META_KEYBINDING_ACTION_SHOW_DESKTOP: FILLME
* @META_KEYBINDING_ACTION_PANEL_MAIN_MENU: FILLME
* @META_KEYBINDING_ACTION_PANEL_RUN_DIALOG: FILLME
@@ -301,8 +294,6 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
META_KEYBINDING_ACTION_CYCLE_PANELS,
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
- META_KEYBINDING_ACTION_TAB_POPUP_SELECT,
- META_KEYBINDING_ACTION_TAB_POPUP_CANCEL,
META_KEYBINDING_ACTION_SHOW_DESKTOP,
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
diff --git a/src/ui/ui.h b/src/ui/ui.h
index f117079..ca52f4c 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -178,6 +178,4 @@ int meta_ui_get_drag_threshold (MetaUI *ui);
MetaUIDirection meta_ui_get_direction (void);
-#include "tabpopup.h"
-
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]