Flip the workspace when using up/down/left/right for move window to, but

2003-05-16  Rob Adams  <robadams@ucla.edu>

	Flip the workspace when using up/down/left/right for move window
	to, but not when specifying a workspace explicitly as in move to
	workspace 4.  Possible fix for #105492.

	* src/keybindings.c (do_handle_move_to_workspace): new function
	moves a window to a workspace with the option to flip to that
	workspace.
	(handle_move_to_workspace): Use new do_handle_move_to_workspace
	function without flipping (a keybinding)
	(handle_move_to_workspace_flip): Use new
	do_handle_move_to_workspace function with flipping (a keybinding)
This commit is contained in:
Rob Adams 2003-05-17 00:00:55 +00:00 committed by Rob Adams
parent 3ad5618596
commit 7fc6c99987
2 changed files with 60 additions and 17 deletions

View File

@ -1,3 +1,12 @@
2003-05-16 Rob Adams <robadams@ucla.edu>
* src/keybindings.c (do_handle_move_to_workspace): new function
moves a window to a workspace with the option to flip to that workspace.
(handle_move_to_workspace): Use new do_handle_move_to_workspace
function without flipping (a keybinding)
(handle_move_to_workspace_flip): Use new do_handle_move_to_workspace
function with flipping (a keybinding)
2003-05-16 Havoc Pennington <hp@redhat.com> 2003-05-16 Havoc Pennington <hp@redhat.com>
* src/frames.c (meta_frames_paint_to_drawable): fix for * src/frames.c (meta_frames_paint_to_drawable): fix for
@ -39,7 +48,7 @@
* configure.in: Added "cy" (Welsh) to ALL_LINGUAS. * configure.in: Added "cy" (Welsh) to ALL_LINGUAS.
2003-05-06 Danilo Šegan <dsegan@gmx.net> 2003-05-06 Danilo Å egan <dsegan@gmx.net>
* configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS. * configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS.
@ -3402,7 +3411,7 @@ Thu Nov 7 17:07:21 2002 Jonathan Blandford <jrb@redhat.com>
don't get focused automatically. Now how do we keep them out of don't get focused automatically. Now how do we keep them out of
the task list? the task list?
2002-06-04 Gustavo Giráldez <gustavo.giraldez@gmx.net> 2002-06-04 Gustavo Giráldez <gustavo.giraldez@gmx.net>
* src/theme.c (draw_op_as_pixbuf): Use icon's instead of image's * src/theme.c (draw_op_as_pixbuf): Use icon's instead of image's
fill_type when type is META_DRAW_ICON. fill_type when type is META_DRAW_ICON.
@ -3748,7 +3757,7 @@ Mon Jun 3 15:12:11 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
2002-05-21 Havoc Pennington <hp@redhat.com> 2002-05-21 Havoc Pennington <hp@redhat.com>
* src/window.c (constrain_position): fix positioning in fullscreen * src/window.c (constrain_position): fix positioning in fullscreen
mode, patch from Gustavo Giráldez mode, patch from Gustavo Giráldez
2002-05-20 Alessio Frusciante <algol@firenze.linux.it> 2002-05-20 Alessio Frusciante <algol@firenze.linux.it>
@ -4091,7 +4100,7 @@ Mon Jun 3 15:12:11 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
2002-04-30 Havoc Pennington <hp@redhat.com> 2002-04-30 Havoc Pennington <hp@redhat.com>
* src/window.c (constrain_position): oops, fix * src/window.c (constrain_position): oops, fix
maximization. Pointed out by Gustavo Giráldez maximization. Pointed out by Gustavo Giráldez
Tue Apr 30 06:24:09 2002 Jonathan Blandford <jrb@gnome.org> Tue Apr 30 06:24:09 2002 Jonathan Blandford <jrb@gnome.org>
@ -5515,7 +5524,7 @@ Tue Nov 20 18:49:16 2001 Owen Taylor <otaylor@redhat.com>
it to current workspace, instead of moving user to the it to current workspace, instead of moving user to the
window's workspace. window's workspace.
2001-10-14 Héctor García Álvarez <hector@scouts-es.org> 2001-10-14 Héctor García Álvarez <hector@scouts-es.org>
* configure.in: Added "es" to ALL_LINGUAS for Spanish translation. * configure.in: Added "es" to ALL_LINGUAS for Spanish translation.

View File

@ -134,6 +134,11 @@ static void handle_move_to_workspace (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
XEvent *event, XEvent *event,
MetaKeyBinding *binding); MetaKeyBinding *binding);
static void handle_move_to_workspace_flip (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_workspace_switch (MetaDisplay *display, static void handle_workspace_switch (MetaDisplay *display,
MetaScreen *screen, MetaScreen *screen,
MetaWindow *window, MetaWindow *window,
@ -381,13 +386,13 @@ static const MetaKeyHandler window_handlers[] = {
GINT_TO_POINTER (10) }, GINT_TO_POINTER (10) },
{ META_KEYBINDING_MOVE_WORKSPACE_12, handle_move_to_workspace, { META_KEYBINDING_MOVE_WORKSPACE_12, handle_move_to_workspace,
GINT_TO_POINTER (11) }, GINT_TO_POINTER (11) },
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace, { META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_LEFT) }, GINT_TO_POINTER (META_MOTION_LEFT) },
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace, { META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_RIGHT) }, GINT_TO_POINTER (META_MOTION_RIGHT) },
{ META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace, { META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_UP) }, GINT_TO_POINTER (META_MOTION_UP) },
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace, { META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_DOWN) }, GINT_TO_POINTER (META_MOTION_DOWN) },
{ META_KEYBINDING_RAISE_OR_LOWER, handle_raise_or_lower, NULL}, { META_KEYBINDING_RAISE_OR_LOWER, handle_raise_or_lower, NULL},
{ META_KEYBINDING_RAISE, handle_raise, NULL}, { META_KEYBINDING_RAISE, handle_raise, NULL},
@ -2986,11 +2991,12 @@ handle_toggle_sticky (MetaDisplay *display,
} }
static void static void
handle_move_to_workspace (MetaDisplay *display, do_handle_move_to_workspace (MetaDisplay *display,
MetaScreen *screen, MetaScreen *screen,
MetaWindow *window, MetaWindow *window,
XEvent *event, XEvent *event,
MetaKeyBinding *binding) MetaKeyBinding *binding,
gboolean flip)
{ {
int which; int which;
MetaWorkspace *workspace; MetaWorkspace *workspace;
@ -3015,9 +3021,8 @@ handle_move_to_workspace (MetaDisplay *display,
{ {
/* Activate second, so the window is never unmapped */ /* Activate second, so the window is never unmapped */
meta_window_change_workspace (window, workspace); meta_window_change_workspace (window, workspace);
#if 0 if (flip)
meta_workspace_activate (workspace); meta_workspace_activate (workspace);
#endif
} }
else else
{ {
@ -3025,6 +3030,35 @@ handle_move_to_workspace (MetaDisplay *display,
} }
} }
static void
handle_move_to_workspace (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
do_handle_move_to_workspace (display,
screen,
window,
event,
binding,
FALSE);
}
static void
handle_move_to_workspace_flip (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
do_handle_move_to_workspace (display,
screen,
window,
event,
binding,
TRUE);
}
static void static void
handle_raise_or_lower (MetaDisplay *display, handle_raise_or_lower (MetaDisplay *display,
MetaScreen *screen, MetaScreen *screen,