38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From: Michael Weghorn <m.weghorn@posteo.de>
|
|
Date: Fri, 7 Jul 2023 15:23:06 +0200
|
|
Subject: a11y atspi: Fix reporting table cell pos at index (0,0)
|
|
|
|
Table (cell) row and column indices both start at 0, so
|
|
an index of 0 is valid.
|
|
|
|
Adapt the check accordingly and check for non-negative
|
|
indices instead of positive ones.
|
|
|
|
(`gtk_cell_accessible_parent_get_cell_position` sets -1
|
|
in the fallback case, so that's still handled as it used
|
|
to be.)
|
|
|
|
This fixes reporting the position of the table cell at
|
|
index (0,0) via AT-SPI.
|
|
|
|
Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/5161
|
|
Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6173
|
|
Origin: 3.24.39, commit:89517775183fa17f77c2cfc413dec86e751c3496
|
|
---
|
|
gtk/a11y/gtkcellaccessible.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/gtk/a11y/gtkcellaccessible.c b/gtk/a11y/gtkcellaccessible.c
|
|
index 2390323..cdae20f 100644
|
|
--- a/gtk/a11y/gtkcellaccessible.c
|
|
+++ b/gtk/a11y/gtkcellaccessible.c
|
|
@@ -401,7 +401,7 @@ gtk_cell_accessible_get_position (AtkTableCell *table_cell,
|
|
gtk_cell_accessible_parent_get_cell_position (GTK_CELL_ACCESSIBLE_PARENT (parent),
|
|
cell,
|
|
row, column);
|
|
- return ((row && *row > 0) || (column && *column > 0));
|
|
+ return ((row && *row >= 0) || (column && *column >= 0));
|
|
}
|
|
|
|
static int
|