[mutter] workspace: Consider text direction when switching
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] workspace: Consider text direction when switching
- Date: Mon, 29 Nov 2010 20:45:54 +0000 (UTC)
commit 6b98644c58256eed7e67f987754adc2a70824186
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Nov 15 17:25:22 2010 +0100
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
src/core/workspace.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 67a4d23..c5c9d6a 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -618,10 +618,20 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
meta_screen_calc_workspace_layout (workspace->screen, num_workspaces,
new_space, &layout2);
- if (layout1.current_col < layout2.current_col)
- direction = META_MOTION_RIGHT;
- if (layout1.current_col > layout2.current_col)
- direction = META_MOTION_LEFT;
+ 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;
+ else if (layout1.current_col > layout2.current_col)
+ direction = META_MOTION_LEFT;
+ }
if (layout1.current_row < layout2.current_row)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]