forked from AuroraMiddleware/gtk
just check the first shift-level of keyboard layout for RTL and LTR
2006-09-20 Behnam Esfahbod <behnam@zwnj.org> * gdk/x11/gdkkeys-x11.c: (get_direction): just check the first shift-level of keyboard layout for RTL and LTR keysyms() (compliment to #116626)
This commit is contained in:
parent
00bfb206ee
commit
a0c6753511
@ -1,3 +1,8 @@
|
||||
2006-09-20 Behnam Esfahbod <behnam@zwnj.org>
|
||||
* gdk/x11/gdkkeys-x11.c:
|
||||
(get_direction): just check the first shift-level of keyboard
|
||||
layout for RTL and LTR keysyms() (compliment to #116626)
|
||||
|
||||
Wed Sep 20 16:59:38 2006 Tim Janik <timj@imendio.com>
|
||||
|
||||
* gtk/gtkviewport.c: always update the bin_window position and size
|
||||
|
@ -561,27 +561,23 @@ get_direction (XkbDescRec *xkb,
|
||||
|
||||
for (code = xkb->min_key_code; code <= xkb->max_key_code; code++)
|
||||
{
|
||||
gint width = XkbKeyGroupWidth (xkb, code, group);
|
||||
gint level;
|
||||
for (level = 0; level < width; level++)
|
||||
{
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
gint level = 0;
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (rtl_minus_ltr > 0)
|
||||
return PANGO_DIRECTION_RTL;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user