GNOME Bugzilla – Bug 387893
Keybindings for changing workspace are opposite in rtl locales
Last modified: 2007-05-25 14:41:27 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.
Created attachment 78690 [details] [review] fix for the problem
http://bugzilla.gnome.org/show_bug.cgi?id=387897 should be solved together with this bug
CCing myself.
I believe that the patch that got committed in bug 387897 might be interesting for metacity too.
I was about to report this. Cc'ing
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").
Metacity needs a generic RTL API support. Something like metacity_get_direction() so the dirty work in this patch can be avoided.
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.
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
Ping
Any objections that i commit this patch? or maybe we can wait until 2.99.
(obsoleting the original patch, which I assume was intended)
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?
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.
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.
Okay, committed.