diff --git a/ChangeLog b/ChangeLog index d037cd8879..90fee00cbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d037cd8879..90fee00cbd 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Fri Sep 7 12:48:56 2001 Matthias Clasen + + * gdk/x11/gdkkeys-x11.c (get_direction): Don't call + g_strcasecmp on NULL strings. (#59058) + 2001-09-06 Alex Larsson * gtk/gtkbin.c: diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index e1249cea1c..63fa3cfb31 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.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; }