[java-atk-wrapper] Use -1 for invalid extents values rather than 0
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Use -1 for invalid extents values rather than 0
- Date: Thu, 15 Aug 2019 09:56:16 +0000 (UTC)
commit 2fdfc78dacd8a74b6ffcd79b192a8e1431cf60da
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Thu Aug 15 11:52:28 2019 +0200
Use -1 for invalid extents values rather than 0
because (0,0) is a valid position and Orca would happily use it
jni/src/jawcomponent.c | 8 ++++----
jni/src/jawimage.c | 8 ++++----
jni/src/jawtext.c | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/jni/src/jawcomponent.c b/jni/src/jawcomponent.c
index c3ae34f..c9d6cab 100644
--- a/jni/src/jawcomponent.c
+++ b/jni/src/jawcomponent.c
@@ -180,10 +180,10 @@ jaw_component_get_extents (AtkComponent *component,
if (x == NULL || y == NULL || width == NULL || height == NULL)
return;
- (*x) = 0;
- (*y) = 0;
- (*width) = 0;
- (*height) = 0;
+ (*x) = -1;
+ (*y) = -1;
+ (*width) = -1;
+ (*height) = -1;
if (component == NULL)
return;
diff --git a/jni/src/jawimage.c b/jni/src/jawimage.c
index 833fb11..c0de23b 100644
--- a/jni/src/jawimage.c
+++ b/jni/src/jawimage.c
@@ -92,8 +92,8 @@ jaw_image_get_image_position (AtkImage *image,
gint *x, gint *y, AtkCoordType coord_type)
{
JAW_DEBUG_C("%p, %p, %p, %d", image, x, y, coord_type);
- (*x) = 0;
- (*y) = 0;
+ (*x) = -1;
+ (*y) = -1;
JAW_GET_IMAGE(image, );
jclass classAtkImage = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkImage");
@@ -142,8 +142,8 @@ static void
jaw_image_get_image_size (AtkImage *image, gint *width, gint *height)
{
JAW_DEBUG_C("%p, %p, %p", image, width, height);
- (*width) = 0;
- (*height) = 0;
+ (*width) = -1;
+ (*height) = -1;
JAW_GET_IMAGE(image, );
jclass classAtkImage = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkImage");
diff --git a/jni/src/jawtext.c b/jni/src/jawtext.c
index 4a47d00..7d3dac2 100644
--- a/jni/src/jawtext.c
+++ b/jni/src/jawtext.c
@@ -373,10 +373,10 @@ jaw_text_get_character_extents (AtkText *text,
AtkCoordType coords)
{
JAW_DEBUG_C("%p, %d, %p, %p, %p, %p, %d", text, offset, x, y, width, height, coords);
- *x = 0;
- *y = 0;
- *width = 0;
- *height = 0;
+ *x = -1;
+ *y = -1;
+ *width = -1;
+ *height = -1;
JAW_GET_TEXT(text, );
jclass classAtkText = (*jniEnv)->FindClass(jniEnv,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]