widgetfocus: Fix copy/paste error

This lead to erratic focus behavior with <Tab> in hboxes, where the
smallest child got focus first instead of the leftmost child.
This commit is contained in:
Benjamin Otte 2018-07-31 20:58:10 +02:00
parent 7ce7e5503f
commit e06044530f

View File

@ -89,8 +89,8 @@ tab_sort_func (gconstpointer a,
if (y1 == y2) if (y1 == y2)
{ {
const float x1 = child_bounds1.origin.y + (child_bounds1.size.width / 2.0f); const float x1 = child_bounds1.origin.x + (child_bounds1.size.width / 2.0f);
const float x2 = child_bounds2.origin.y + (child_bounds2.size.width / 2.0f); const float x2 = child_bounds2.origin.x + (child_bounds2.size.width / 2.0f);
if (text_direction == GTK_TEXT_DIR_RTL) if (text_direction == GTK_TEXT_DIR_RTL)
return (x1 < x2) ? 1 : ((x1 == x2) ? 0 : -1); return (x1 < x2) ? 1 : ((x1 == x2) ? 0 : -1);