Commit d8e3d58d authored by Matthias Clasen's avatar Matthias Clasen

gdk/x11/gdkkeys-x11.c (get_direction): Don't call g_strcasecmp on NULL strings. (#59058)

parent 9fccd2cc
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
Fri Sep 7 12:48:56 2001 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkkeys-x11.c (get_direction): Don't call
g_strcasecmp on NULL strings. (#59058)
2001-09-06 Alex Larsson <alexl@redhat.com>
* gtk/gtkbin.c:
......
......@@ -204,16 +204,20 @@ get_direction (void)
XkbGetState (gdk_display, XkbUseCoreKbd, &state_rec);
name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
if (g_strcasecmp (name, "arabic") == 0 ||
g_strcasecmp (name, "hebrew") == 0 ||
g_strcasecmp (name, "israelian") == 0)
result = PANGO_DIRECTION_RTL;
else
if (xkb->names->groups[state_rec.locked_group] == None)
result = PANGO_DIRECTION_LTR;
else
{
name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
if (g_strcasecmp (name, "arabic") == 0 ||
g_strcasecmp (name, "hebrew") == 0 ||
g_strcasecmp (name, "israelian") == 0)
result = PANGO_DIRECTION_RTL;
else
result = PANGO_DIRECTION_LTR;
g_free (name);
}
g_free (name);
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment