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 50768 - Make the input widget's cursor Xkb keyboard layout aware
Make the input widget's cursor Xkb keyboard layout aware
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
1.3.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-02-11 20:44 UTC by Ilya Konstantinov
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ilya Konstantinov 2001-02-11 20:44:14 UTC
The input widget's cursor should be aware of the keyboard layout we're 
currently using, and whether we're about to input RTL. When we're in an 
RTL-language keyboard layout, the cursor should have the indicator arrow 
pointing to the left, to reflect the input directionality. Similarily, 
switching to an LTR-language (e.g. English) should make the indicator 
arrow pointing to the right.

This would also eliminate the need for the "double cursor", at places 
where GTK+ cannot otherwise know on what side of the string the input 
would continue (Hebrew will attach to the left of the existing Hebrew 
string, but if we'll enter an English string suddenly, it'll be added to 
the right of the Hebrew string -- in strong-LTR aligned BiDi of course). 
The prediction about where the next input would be added would be based 
on the current keyboard layout.

Since with proper Xkb keyboard maps we can know the current group's Name, 
we can use this name to decide whether the current group (in multigroup 
maps, such as an English-Hebrew one) is for inputing an RTL language 
(such as Hebrew or Arabic) or an LTR language (such as English).

This should require standardization of the group names used in the Xkb 
maps distributed with XFree86. Group names are supposed to be named after 
the language, not the country. And even then, "Israelian" isn't quite 
proper English (supposed to be "Israeli" -- or in our case, "Hebrew").
Comment 1 Owen Taylor 2001-06-07 19:39:04 UTC
Patches for this can be found at:
 
 http://mail.gnome.org/archives/gtk-devel-list/2001-June/msg00140.html

(Actually, there are some, since fixed, bugs in the GtkEnty portion,
but GtkTextView should work fine.)
Comment 2 Owen Taylor 2001-06-08 16:07:57 UTC
Fri Jun  8 12:03:07 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkkeys.[ch]: Add a direction-changed signal,
	and gdk_keymap_get_current_direction().

	* gdk/x11/gdkevents-x11.c gdk/x11/gdkkeys-x11.c
	  gdk/x11/gdkmain-x11.c gdk/x11/gdkprivate-x11.h: Track
	the current locked group, use it to set the keymap
	direction.

	* gtk/gtksettings.c: Add a new gtk-split-cursor setting
	to determine whether we draw a split cursor or use
	a jumping cursor based on the current direction.

	* gtk/gtkentry.c gtk/gtktextview.c gtk/gtktextlayout.[ch]:
	Obey the split cursor setting.