GNOME Bugzilla – Bug 164125
spurious selection of RTL text entry when XKB disabled
Last modified: 2005-02-04 15:37:58 UTC
Please describe the problem: If GDK is compiled with --disable-xkb, gdk_keymap_get_direction() becomes a stub function that always returns PANGO_DIRECTION_NEUTRAL. Unfortunately, this interacts badly with code in GtkTextView that does: if (gdk_keymap_get_direction (keymap) != PANGO_DIRECTION_LTR) new_keyboard_dir = GTK_TEXT_DIR_LTR; else new_keyboard_dir = GTK_TEXT_DIR_RTL; The result is that a GtkTextView with no contents, or one that is displaying only digits, will adopt RTL mode. If you enter some text, it switches back to LTR mode. GtkEntry seems to have a similar problem. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
*** Bug 166123 has been marked as a duplicate of this bug. ***
Reopening : fix in CVS isn't complete when focus is not in the widget. Attached patch fixes the remaining regression.
Created attachment 36971 [details] [review] completely fixes regression
2005-02-04 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (gtk_entry_create_layout): Avoid spurious selection of RTL direction if the widget does not have focus. (#164125, Frederic Crozat)