mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
put _NET_DESKTOP_NAMES in the array of atom names, so desktop names might
2002-07-06 Havoc Pennington <hp@pobox.com> * src/display.c (meta_display_open): put _NET_DESKTOP_NAMES in the array of atom names, so desktop names might work and we don't read uninitialized memory. * src/main.c (main): add VERSION/timestamp verbose message. * src/keybindings.c: implement cycle_windows cycle_panels * src/metacity.schemas.in: add the cycle_windows cycle_panels keybindings * src/prefs.h (META_KEYBINDING_FOCUS_PREVIOUS): replace FOCUS_PREVIOUS key binding with CYCLE_WINDOWS and CYCLE_PANELS (not good names really, but I don't have ideas). * src/common.h: add a grab op for alt+esc window cycling
This commit is contained in:
parent
efeedae712
commit
8c3437fd27
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
|||||||
|
2002-07-06 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/display.c (meta_display_open): put _NET_DESKTOP_NAMES in the
|
||||||
|
array of atom names, so desktop names might work and we don't read
|
||||||
|
uninitialized memory.
|
||||||
|
|
||||||
|
* src/main.c (main): add VERSION/timestamp verbose message.
|
||||||
|
|
||||||
|
* src/keybindings.c: implement cycle_windows cycle_panels
|
||||||
|
|
||||||
|
* src/metacity.schemas.in: add the cycle_windows cycle_panels
|
||||||
|
keybindings
|
||||||
|
|
||||||
|
* src/prefs.h (META_KEYBINDING_FOCUS_PREVIOUS): replace
|
||||||
|
FOCUS_PREVIOUS key binding with CYCLE_WINDOWS and CYCLE_PANELS
|
||||||
|
(not good names really, but I don't have ideas).
|
||||||
|
|
||||||
|
* src/common.h: add a grab op for alt+esc window cycling
|
||||||
|
|
||||||
2002-07-05 Havoc Pennington <hp@pobox.com>
|
2002-07-05 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/themes/Makefile.am (THEMES): Take Gorilla out until it gets
|
* src/themes/Makefile.am (THEMES): Take Gorilla out until it gets
|
||||||
|
@ -99,9 +99,14 @@ typedef enum
|
|||||||
META_GRAB_OP_KEYBOARD_RESIZING_SW,
|
META_GRAB_OP_KEYBOARD_RESIZING_SW,
|
||||||
META_GRAB_OP_KEYBOARD_RESIZING_NW,
|
META_GRAB_OP_KEYBOARD_RESIZING_NW,
|
||||||
|
|
||||||
|
/* Alt+Tab */
|
||||||
META_GRAB_OP_KEYBOARD_TABBING_NORMAL,
|
META_GRAB_OP_KEYBOARD_TABBING_NORMAL,
|
||||||
META_GRAB_OP_KEYBOARD_TABBING_DOCK,
|
META_GRAB_OP_KEYBOARD_TABBING_DOCK,
|
||||||
|
|
||||||
|
/* Alt+Esc */
|
||||||
|
META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL,
|
||||||
|
META_GRAB_OP_KEYBOARD_ESCAPING_DOCK,
|
||||||
|
|
||||||
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
||||||
|
|
||||||
/* Frame button ops */
|
/* Frame button ops */
|
||||||
|
@ -226,7 +226,8 @@ meta_display_open (const char *name)
|
|||||||
"MULTIPLE",
|
"MULTIPLE",
|
||||||
"TIMESTAMP",
|
"TIMESTAMP",
|
||||||
"VERSION",
|
"VERSION",
|
||||||
"ATOM_PAIR"
|
"ATOM_PAIR",
|
||||||
|
"_NET_DESKTOP_NAMES"
|
||||||
};
|
};
|
||||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||||
|
|
||||||
@ -783,6 +784,8 @@ grab_op_is_keyboard (MetaGrabOp op)
|
|||||||
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
|
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||||
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
@ -2297,11 +2300,13 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||||
meta_screen_ensure_tab_popup (screen,
|
meta_screen_ensure_tab_popup (screen,
|
||||||
META_TAB_LIST_NORMAL);
|
META_TAB_LIST_NORMAL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||||
meta_screen_ensure_tab_popup (screen,
|
meta_screen_ensure_tab_popup (screen,
|
||||||
META_TAB_LIST_DOCKS);
|
META_TAB_LIST_DOCKS);
|
||||||
break;
|
break;
|
||||||
@ -2324,11 +2329,15 @@ void
|
|||||||
meta_display_end_grab_op (MetaDisplay *display,
|
meta_display_end_grab_op (MetaDisplay *display,
|
||||||
Time timestamp)
|
Time timestamp)
|
||||||
{
|
{
|
||||||
|
meta_verbose ("Ending grab op %d at time %ld\n", display->grab_op, timestamp);
|
||||||
|
|
||||||
if (display->grab_op == META_GRAB_OP_NONE)
|
if (display->grab_op == META_GRAB_OP_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_NORMAL ||
|
if (display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_NORMAL ||
|
||||||
display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_DOCK ||
|
display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_DOCK ||
|
||||||
|
display->grab_op == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL ||
|
||||||
|
display->grab_op == META_GRAB_OP_KEYBOARD_ESCAPING_DOCK ||
|
||||||
display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING)
|
display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING)
|
||||||
{
|
{
|
||||||
meta_ui_tab_popup_free (display->grab_screen->tab_popup);
|
meta_ui_tab_popup_free (display->grab_screen->tab_popup);
|
||||||
|
@ -50,7 +50,7 @@ static void handle_tab_forward (MetaDisplay *display,
|
|||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaKeyBinding *binding);
|
MetaKeyBinding *binding);
|
||||||
static void handle_focus_previous (MetaDisplay *display,
|
static void handle_cycle_forward (MetaDisplay *display,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaKeyBinding *binding);
|
MetaKeyBinding *binding);
|
||||||
@ -184,8 +184,10 @@ static const MetaKeyHandler screen_handlers[] = {
|
|||||||
GINT_TO_POINTER (META_TAB_LIST_NORMAL) },
|
GINT_TO_POINTER (META_TAB_LIST_NORMAL) },
|
||||||
{ META_KEYBINDING_SWITCH_PANELS, handle_tab_forward,
|
{ META_KEYBINDING_SWITCH_PANELS, handle_tab_forward,
|
||||||
GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
|
GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
|
||||||
{ META_KEYBINDING_FOCUS_PREVIOUS, handle_focus_previous,
|
{ META_KEYBINDING_CYCLE_WINDOWS, handle_cycle_forward,
|
||||||
NULL },
|
GINT_TO_POINTER (META_TAB_LIST_NORMAL) },
|
||||||
|
{ META_KEYBINDING_CYCLE_PANELS, handle_cycle_forward,
|
||||||
|
GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
|
||||||
{ META_KEYBINDING_SHOW_DESKTOP, handle_toggle_desktop,
|
{ META_KEYBINDING_SHOW_DESKTOP, handle_toggle_desktop,
|
||||||
NULL },
|
NULL },
|
||||||
{ NULL, NULL, NULL }
|
{ NULL, NULL, NULL }
|
||||||
@ -1188,11 +1190,14 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
|
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
||||||
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||||
|
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Processing event for keyboard tabbing\n");
|
"Processing event for keyboard tabbing/cycling\n");
|
||||||
g_assert (window != NULL);
|
g_assert (window != NULL);
|
||||||
handled = process_tab_grab (display, window, event, keysym);
|
handled = process_tab_grab (display, window, event, keysym);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Processing event for keyboard workspace switching\n");
|
"Processing event for keyboard workspace switching\n");
|
||||||
@ -1701,7 +1706,8 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
MetaKeyBindingAction action;
|
MetaKeyBindingAction action;
|
||||||
|
gboolean popup_not_showing;
|
||||||
|
|
||||||
window = NULL; /* be sure we don't use this, it's irrelevant */
|
window = NULL; /* be sure we don't use this, it's irrelevant */
|
||||||
|
|
||||||
screen = display->grab_window->screen;
|
screen = display->grab_window->screen;
|
||||||
@ -1754,18 +1760,45 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
action = meta_prefs_get_keybinding_action (keysym,
|
action = meta_prefs_get_keybinding_action (keysym,
|
||||||
display->grab_mask);
|
display->grab_mask);
|
||||||
|
|
||||||
|
/* FIXME weird side effect here is that you can use the Escape
|
||||||
|
* key while tabbing, or the tab key while escaping
|
||||||
|
*/
|
||||||
|
|
||||||
|
popup_not_showing = FALSE;
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
|
case META_KEYBINDING_ACTION_CYCLE_PANELS:
|
||||||
|
case META_KEYBINDING_ACTION_CYCLE_WINDOWS:
|
||||||
|
popup_not_showing = TRUE;
|
||||||
|
/* FALL THRU */
|
||||||
case META_KEYBINDING_ACTION_SWITCH_PANELS:
|
case META_KEYBINDING_ACTION_SWITCH_PANELS:
|
||||||
case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
|
case META_KEYBINDING_ACTION_SWITCH_WINDOWS:
|
||||||
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
|
"Key pressed, moving tab focus in popup\n");
|
||||||
|
|
||||||
if (event->xkey.state & ShiftMask)
|
if (event->xkey.state & ShiftMask)
|
||||||
meta_ui_tab_popup_backward (screen->tab_popup);
|
meta_ui_tab_popup_backward (screen->tab_popup);
|
||||||
else
|
else
|
||||||
meta_ui_tab_popup_forward (screen->tab_popup);
|
meta_ui_tab_popup_forward (screen->tab_popup);
|
||||||
|
|
||||||
/* continue grab */
|
if (popup_not_showing)
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
{
|
||||||
"Tab key pressed, moving tab focus in popup\n");
|
/* We can't actually change window focus, due to the grab.
|
||||||
|
* but raise the window.
|
||||||
|
*/
|
||||||
|
Window target_xwindow;
|
||||||
|
MetaWindow *target_window;
|
||||||
|
|
||||||
|
target_xwindow =
|
||||||
|
(Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
|
||||||
|
target_window =
|
||||||
|
meta_display_lookup_x_window (display, target_xwindow);
|
||||||
|
|
||||||
|
if (target_window)
|
||||||
|
{
|
||||||
|
meta_window_raise (target_window);
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1775,7 +1808,7 @@ process_tab_grab (MetaDisplay *display,
|
|||||||
|
|
||||||
/* end grab */
|
/* end grab */
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Ending tabbing, uninteresting key pressed\n");
|
"Ending tabbing/cycling, uninteresting key pressed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1997,7 +2030,7 @@ handle_activate_menu (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static MetaGrabOp
|
static MetaGrabOp
|
||||||
op_from_tab_type (MetaTabList type)
|
tab_op_from_tab_type (MetaTabList type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -2012,11 +2045,28 @@ op_from_tab_type (MetaTabList type)
|
|||||||
return 0;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_assert_not_reached ();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_tab_forward (MetaDisplay *display,
|
do_choose_window (MetaDisplay *display,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaKeyBinding *binding)
|
MetaKeyBinding *binding,
|
||||||
|
gboolean show_popup)
|
||||||
{
|
{
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
MetaTabList type;
|
MetaTabList type;
|
||||||
@ -2025,7 +2075,7 @@ handle_tab_forward (MetaDisplay *display,
|
|||||||
type = GPOINTER_TO_INT (binding->handler->data);
|
type = GPOINTER_TO_INT (binding->handler->data);
|
||||||
|
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Tab type = %d\n", type);
|
"Tab list = %d show_popup = %d\n", type, show_popup);
|
||||||
|
|
||||||
/* backward if shift is down, this isn't configurable */
|
/* backward if shift is down, this isn't configurable */
|
||||||
backward = (event->xkey.state & ShiftMask) != 0;
|
backward = (event->xkey.state & ShiftMask) != 0;
|
||||||
@ -2066,13 +2116,15 @@ handle_tab_forward (MetaDisplay *display,
|
|||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Starting tab between windows, showing popup\n");
|
"Starting tab/cycle between windows\n");
|
||||||
|
|
||||||
if (meta_display_begin_grab_op (window->display,
|
if (meta_display_begin_grab_op (window->display,
|
||||||
window->screen,
|
window->screen,
|
||||||
display->focus_window ?
|
display->focus_window ?
|
||||||
display->focus_window : window,
|
display->focus_window : window,
|
||||||
op_from_tab_type (type),
|
show_popup ?
|
||||||
|
tab_op_from_tab_type (type) :
|
||||||
|
cycle_op_from_tab_type (type),
|
||||||
FALSE,
|
FALSE,
|
||||||
0,
|
0,
|
||||||
event->xkey.state & ~(display->ignored_modifier_mask),
|
event->xkey.state & ~(display->ignored_modifier_mask),
|
||||||
@ -2081,84 +2133,32 @@ handle_tab_forward (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
meta_ui_tab_popup_select (window->screen->tab_popup,
|
meta_ui_tab_popup_select (window->screen->tab_popup,
|
||||||
(MetaTabEntryKey) window->xwindow);
|
(MetaTabEntryKey) window->xwindow);
|
||||||
/* only after selecting proper window */
|
|
||||||
meta_ui_tab_popup_set_showing (window->screen->tab_popup,
|
if (show_popup)
|
||||||
TRUE);
|
meta_ui_tab_popup_set_showing (window->screen->tab_popup,
|
||||||
|
TRUE);
|
||||||
|
else
|
||||||
|
meta_window_raise (window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static MetaWindow *
|
static void
|
||||||
get_previous_focus_window (MetaDisplay *display,
|
handle_tab_forward (MetaDisplay *display,
|
||||||
MetaScreen *screen)
|
MetaWindow *event_window,
|
||||||
|
XEvent *event,
|
||||||
|
MetaKeyBinding *binding)
|
||||||
{
|
{
|
||||||
MetaWindow *window = NULL;
|
do_choose_window (display, event_window, event, binding, TRUE);
|
||||||
|
|
||||||
/* get previously-focused window, front of list is currently
|
|
||||||
* focused window
|
|
||||||
*/
|
|
||||||
if (display->mru_list &&
|
|
||||||
display->mru_list->next)
|
|
||||||
{
|
|
||||||
window = display->mru_list->next->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window &&
|
|
||||||
!meta_window_visible_on_workspace (window,
|
|
||||||
screen->active_workspace))
|
|
||||||
{
|
|
||||||
window = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window == NULL)
|
|
||||||
{
|
|
||||||
/* Pick first window in tab order */
|
|
||||||
window = meta_display_get_tab_next (screen->display,
|
|
||||||
META_TAB_LIST_NORMAL,
|
|
||||||
screen,
|
|
||||||
screen->active_workspace,
|
|
||||||
NULL,
|
|
||||||
TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window &&
|
|
||||||
!meta_window_visible_on_workspace (window,
|
|
||||||
screen->active_workspace))
|
|
||||||
{
|
|
||||||
window = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return window;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_focus_previous (MetaDisplay *display,
|
handle_cycle_forward (MetaDisplay *display,
|
||||||
MetaWindow *event_window,
|
MetaWindow *event_window,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaKeyBinding *binding)
|
MetaKeyBinding *binding)
|
||||||
{
|
{
|
||||||
MetaWindow *window;
|
do_choose_window (display, event_window, event, binding, FALSE);
|
||||||
MetaScreen *screen;
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
|
||||||
"Focus previous window\n");
|
|
||||||
|
|
||||||
screen = meta_display_screen_for_root (display,
|
|
||||||
event->xkey.root);
|
|
||||||
|
|
||||||
if (screen == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
window = get_previous_focus_window (display, screen);
|
|
||||||
|
|
||||||
if (window)
|
|
||||||
{
|
|
||||||
meta_window_raise (window);
|
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
|
||||||
"Focusing %s due to 'focus previous' keybinding\n",
|
|
||||||
window->desc);
|
|
||||||
meta_window_focus (window, event->xkey.time);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2405,7 +2405,7 @@ handle_workspace_switch (MetaDisplay *display,
|
|||||||
|
|
||||||
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
|
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
|
||||||
|
|
||||||
/* only after selecting proper window */
|
/* only after selecting proper space */
|
||||||
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
|
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
src/main.c
13
src/main.c
@ -39,6 +39,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
|
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
|
||||||
static GMainLoop *meta_main_loop = NULL;
|
static GMainLoop *meta_main_loop = NULL;
|
||||||
@ -98,6 +99,15 @@ main (int argc, char **argv)
|
|||||||
if (g_getenv ("METACITY_DEBUG"))
|
if (g_getenv ("METACITY_DEBUG"))
|
||||||
meta_set_debugging (TRUE);
|
meta_set_debugging (TRUE);
|
||||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||||
|
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
GDate d;
|
||||||
|
g_date_clear (&d, 1);
|
||||||
|
g_date_set_time (&d, time (NULL));
|
||||||
|
g_date_strftime (buf, sizeof (buf), "%x", &d);
|
||||||
|
meta_verbose ("Metacity version %s running on %s\n", VERSION, buf);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const char *charset;
|
const char *charset;
|
||||||
@ -105,7 +115,7 @@ main (int argc, char **argv)
|
|||||||
meta_verbose ("Running in locale \"%s\" with encoding \"%s\"\n",
|
meta_verbose ("Running in locale \"%s\" with encoding \"%s\"\n",
|
||||||
setlocale (LC_ALL, NULL), charset);
|
setlocale (LC_ALL, NULL), charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
@ -269,7 +279,6 @@ main (int argc, char **argv)
|
|||||||
g_log_set_handler ("GThread",
|
g_log_set_handler ("GThread",
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||||
log_handler, NULL);
|
log_handler, NULL);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
|
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
|
||||||
|
@ -729,7 +729,8 @@ you set
|
|||||||
<locale name="C">
|
<locale name="C">
|
||||||
<short>Move focus between windows</short>
|
<short>Move focus between windows</short>
|
||||||
<long>
|
<long>
|
||||||
The keybinding used to move focus between windows.
|
The keybinding used to move focus between windows, using
|
||||||
|
a popup window.
|
||||||
(Traditionally <Alt>Tab)
|
(Traditionally <Alt>Tab)
|
||||||
|
|
||||||
The format looks like "<Control>a" or
|
The format looks like "<Control>a" or
|
||||||
@ -754,7 +755,7 @@ you set
|
|||||||
<short>Move focus between panels and the desktop</short>
|
<short>Move focus between panels and the desktop</short>
|
||||||
<long>
|
<long>
|
||||||
The keybinding used to move focus between panels and
|
The keybinding used to move focus between panels and
|
||||||
the desktop.
|
the desktop, using a popup window.
|
||||||
|
|
||||||
The format looks like "<Control>a" or
|
The format looks like "<Control>a" or
|
||||||
"<Shift><Alt>F1.
|
"<Shift><Alt>F1.
|
||||||
@ -769,16 +770,17 @@ you set
|
|||||||
</schema>
|
</schema>
|
||||||
|
|
||||||
<schema>
|
<schema>
|
||||||
<key>/schemas/apps/metacity/global_keybindings/focus_previous_window</key>
|
<key>/schemas/apps/metacity/global_keybindings/cycle_windows</key>
|
||||||
<applyto>/apps/metacity/global_keybindings/focus_previous_window</applyto>
|
<applyto>/apps/metacity/global_keybindings/cycle_windows</applyto>
|
||||||
<owner>metacity</owner>
|
<owner>metacity</owner>
|
||||||
<type>string</type>
|
<type>string</type>
|
||||||
<default><Alt>Escape</default>
|
<default><Alt>Escape</default>
|
||||||
<locale name="C">
|
<locale name="C">
|
||||||
<short>Move focus to the previously-focused window</short>
|
<short>Move focus between windows</short>
|
||||||
<long>
|
<long>
|
||||||
The keybinding used to move focus back to the window which last
|
The keybinding used to move focus between windows without
|
||||||
had the focus.
|
a popup window.
|
||||||
|
(Traditionally <Alt>Escape)
|
||||||
|
|
||||||
The format looks like "<Control>a" or
|
The format looks like "<Control>a" or
|
||||||
"<Shift><Alt>F1.
|
"<Shift><Alt>F1.
|
||||||
@ -791,7 +793,30 @@ you set
|
|||||||
</long>
|
</long>
|
||||||
</locale>
|
</locale>
|
||||||
</schema>
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/global_keybindings/cycle_panels</key>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/cycle_panels</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default><Control><Alt>Escape</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Move focus between panels and the desktop</short>
|
||||||
|
<long>
|
||||||
|
The keybinding used to move focus between panels and
|
||||||
|
the desktop, without a popup window.
|
||||||
|
|
||||||
|
The format looks like "<Control>a" or
|
||||||
|
"<Shift><Alt>F1.
|
||||||
|
|
||||||
|
The parser is fairly liberal and allows lower or upper case,
|
||||||
|
and also abbreviations such as "<Ctl>" and
|
||||||
|
"<Ctrl>". If you set the option to the special string
|
||||||
|
"disabled", then there will be no keybinding for this
|
||||||
|
action.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
<schema>
|
<schema>
|
||||||
<key>/schemas/apps/metacity/global_keybindings/show_desktop</key>
|
<key>/schemas/apps/metacity/global_keybindings/show_desktop</key>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Metacity preferences */
|
/* Metacity preferences */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 Havoc Pennington
|
* Copyright (C) 2001 Havoc Pennington, Copyright (C) 2002 Red Hat Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
@ -819,7 +819,8 @@ static MetaKeyPref screen_bindings[] = {
|
|||||||
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0 },
|
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0 },
|
||||||
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0 },
|
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0 },
|
||||||
{ META_KEYBINDING_SWITCH_PANELS, 0, 0 },
|
{ META_KEYBINDING_SWITCH_PANELS, 0, 0 },
|
||||||
{ META_KEYBINDING_FOCUS_PREVIOUS, 0, 0 },
|
{ META_KEYBINDING_CYCLE_WINDOWS, 0, 0 },
|
||||||
|
{ META_KEYBINDING_CYCLE_PANELS, 0, 0 },
|
||||||
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0 },
|
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0 },
|
||||||
{ NULL, 0, 0 }
|
{ NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
@ -82,7 +82,8 @@ void meta_prefs_set_num_workspaces (int n_workspaces);
|
|||||||
#define META_KEYBINDING_WORKSPACE_DOWN "switch_to_workspace_down"
|
#define META_KEYBINDING_WORKSPACE_DOWN "switch_to_workspace_down"
|
||||||
#define META_KEYBINDING_SWITCH_WINDOWS "switch_windows"
|
#define META_KEYBINDING_SWITCH_WINDOWS "switch_windows"
|
||||||
#define META_KEYBINDING_SWITCH_PANELS "switch_panels"
|
#define META_KEYBINDING_SWITCH_PANELS "switch_panels"
|
||||||
#define META_KEYBINDING_FOCUS_PREVIOUS "focus_previous_window"
|
#define META_KEYBINDING_CYCLE_WINDOWS "cycle_windows"
|
||||||
|
#define META_KEYBINDING_CYCLE_PANELS "cycle_panels"
|
||||||
#define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
|
#define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
|
||||||
|
|
||||||
/* Window bindings */
|
/* Window bindings */
|
||||||
@ -134,7 +135,8 @@ typedef enum _MetaKeyBindingAction
|
|||||||
META_KEYBINDING_ACTION_WORKSPACE_DOWN,
|
META_KEYBINDING_ACTION_WORKSPACE_DOWN,
|
||||||
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
|
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
|
||||||
META_KEYBINDING_ACTION_SWITCH_PANELS,
|
META_KEYBINDING_ACTION_SWITCH_PANELS,
|
||||||
META_KEYBINDING_ACTION_FOCUS_PREVIOUS,
|
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
|
||||||
|
META_KEYBINDING_ACTION_CYCLE_PANELS,
|
||||||
META_KEYBINDING_ACTION_SHOW_DESKTOP
|
META_KEYBINDING_ACTION_SHOW_DESKTOP
|
||||||
} MetaKeyBindingAction;
|
} MetaKeyBindingAction;
|
||||||
|
|
||||||
|
@ -299,9 +299,12 @@ meta_ui_tab_popup_set_showing (MetaTabPopup *popup,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_verbose ("Hiding tab popup window\n");
|
if (GTK_WIDGET_VISIBLE (popup->window))
|
||||||
gtk_widget_hide (popup->window);
|
{
|
||||||
meta_core_increment_event_serial (gdk_display);
|
meta_verbose ("Hiding tab popup window\n");
|
||||||
|
gtk_widget_hide (popup->window);
|
||||||
|
meta_core_increment_event_serial (gdk_display);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user