After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 387893 - Keybindings for changing workspace are opposite in rtl locales
Keybindings for changing workspace are opposite in rtl locales
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on: 92212
Blocks: Hebrew
 
 
Reported: 2006-12-20 13:00 UTC by Yair Hershkovitz
Modified: 2007-05-25 14:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
fix for the problem (2.22 KB, patch)
2006-12-20 13:04 UTC, Yair Hershkovitz
needs-work Details | Review
Fix RTL workspace switching issues (3.26 KB, patch)
2007-04-14 18:03 UTC, Yair Hershkovitz
none Details | Review
Fix RTL workspace switching issues (5.69 KB, patch)
2007-04-16 14:30 UTC, Yair Hershkovitz
committed Details | Review

Description Yair Hershkovitz 2006-12-20 13:00:18 UTC
When using an rtl locale, pressing the "move workspace to the left/right" keybinding will switch in the workspace popup to the opposite direction.
Comment 1 Yair Hershkovitz 2006-12-20 13:04:40 UTC
Created attachment 78690 [details] [review]
fix for the problem
Comment 2 Yair Hershkovitz 2006-12-20 13:14:27 UTC
http://bugzilla.gnome.org/show_bug.cgi?id=387897 should be solved together with this bug
Comment 3 Behdad Esfahbod 2007-02-07 04:21:58 UTC
CCing myself.
Comment 4 Vincent Untz 2007-02-12 21:46:11 UTC
I believe that the patch that got committed in bug 387897 might be interesting for metacity too.
Comment 5 Djihed Afifi 2007-04-02 21:52:56 UTC
I was about to report this. Cc'ing
Comment 6 Elijah Newren 2007-04-03 18:53:33 UTC
This will cause a segmentation fault since workspace->screen->tab_popup will be NULL when meta_workspace_get_neighbor() is called from window.c:menu_callback() (i.e. when right clicking on the titlebar and selecting "Move to workspace right").
Comment 7 Yair Hershkovitz 2007-04-04 12:01:16 UTC
Metacity needs a generic RTL API support. Something like metacity_get_direction() so the dirty work in this patch can be avoided.
Comment 8 Yair Hershkovitz 2007-04-14 18:03:01 UTC
Created attachment 86350 [details] [review]
Fix RTL workspace switching issues

Improved fix.

- General meta_ui_get_direction() API.
- Works for changing workspace both from the switcher popup and the window menu.
- Fix the text displayed in the window menu ("Switch workspace to the right" instead of "Switch workspace to he left" and vice versa)
- Also fix the window popup menu to be draw to the left size of the cursor.
Comment 9 Yair Hershkovitz 2007-04-16 14:30:29 UTC
Created attachment 86429 [details] [review]
Fix RTL workspace switching issues

Save as previous patch. Also fix tooltips and window menu (when clicking on the "menu" button and when when pressing alt+space) alignments
Comment 10 Yair Hershkovitz 2007-04-30 07:29:26 UTC
Ping
Comment 11 Yair Hershkovitz 2007-05-09 07:47:14 UTC
Any objections that i commit this patch? or maybe we can wait until 2.99.
Comment 12 Thomas Thurman 2007-05-22 21:37:48 UTC
(obsoleting the original patch, which I assume was intended)
Comment 13 Thomas Thurman 2007-05-23 15:11:23 UTC
So, the things I'm testing for:
  * In LTR, left goes to the left workspace and right to the right; in RTL vice
versa

   Alt-tab works RTL in Arabic.
   Workspaces start on the right and go left in Arabic.
   The window menu's jump L/R options work as you'd expect in Arabic, though I can't say whether it correctly says "move to workspace left" instead of "move to workspace right" since I don't speak Arabic

  * In LTR, popping up the window menu with the keyboard puts it on the LHS of
the window; in RTL the RHS
  yes
  * In LTR, the window menu is flush with the screen to the left; in RHS to the
right
  yes
  * Tooltips are right-justified in RTL and left-justified in LTR. 
  yes

English still works as previously.

The only thing I'm not certain about is whether it's okay to #include "ui.h" in the places you have without breaking visibility rules. I think it is, but I'd like to check with others.

But given all this, I think we're good to commit. I'm quite happy to write a changelog entry, but would you prefer to?
Comment 14 Thomas Thurman 2007-05-23 18:26:18 UTC
One other minor thing:

The debug statement

   meta_verbose ("Getting neighbor of %d in direction %s\n",
                 current_space, meta_motion_direction_to_string (direction));

might possibly be better if it now noted whether we were going RTL or LTR, but that's probably just window dressing.
Comment 15 Yair Hershkovitz 2007-05-25 10:01:10 UTC
Regarding the debug statement, the neighbor and direction are correct with respect to the UI direction. It's obvious for the one debugging whether the UI direction is RTL or LTR.

If you find the time, please write a ChangeLog entry. I have a tight schedule these days and i won't be able to do that in the coming week.
Comment 16 Thomas Thurman 2007-05-25 14:36:03 UTC
Okay, committed.