mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
workspace: Consider text direction when switching
A direction parameter is passed to meta_compositor_switch_workspace(), to indicate the direction of the switch depending on the workspace layout. In contrast to the switcher popup, this parameter does not take the text direction of the locale into account. Change this, so that the workspace switching animations move in the correct direction. https://bugzilla.gnome.org/show_bug.cgi?id=636083
This commit is contained in:
parent
5397335ae8
commit
6b98644c58
@ -618,10 +618,20 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
meta_screen_calc_workspace_layout (workspace->screen, num_workspaces,
|
||||
new_space, &layout2);
|
||||
|
||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||
{
|
||||
if (layout1.current_col > layout2.current_col)
|
||||
direction = META_MOTION_RIGHT;
|
||||
else if (layout1.current_col < layout2.current_col)
|
||||
direction = META_MOTION_LEFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (layout1.current_col < layout2.current_col)
|
||||
direction = META_MOTION_RIGHT;
|
||||
if (layout1.current_col > layout2.current_col)
|
||||
else if (layout1.current_col > layout2.current_col)
|
||||
direction = META_MOTION_LEFT;
|
||||
}
|
||||
|
||||
if (layout1.current_row < layout2.current_row)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user