2021-11-11 21:36:12 +01:00
|
|
|
From 571e3b6e4f386abf12d3db70b9468e092c8d72bd Mon Sep 17 00:00:00 2001
|
|
|
|
From: Alynx Zhou <alynx.zhou@gmail.com>
|
|
|
|
Date: Tue, 24 Aug 2021 10:12:52 +0800
|
2021-11-18 22:13:10 +01:00
|
|
|
Subject: [PATCH] client/gtk3/ibusimcontext: Fix wrong cursor location in gtk3
|
2021-11-11 21:36:12 +01:00
|
|
|
apps
|
|
|
|
|
|
|
|
---
|
2021-11-18 22:13:10 +01:00
|
|
|
client/gtk3/ibusimcontext.c | 5 ++++-
|
2021-11-11 21:36:12 +01:00
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
|
2021-11-18 22:13:10 +01:00
|
|
|
diff --git a/client/gtk3/ibusimcontext.c b/client/gtk3/ibusimcontext.c
|
2021-11-11 21:36:12 +01:00
|
|
|
index da9a402ff..b1ccede95 100644
|
2021-11-18 22:13:10 +01:00
|
|
|
--- a/client/gtk3/ibusimcontext.c
|
|
|
|
+++ b/client/gtk3/ibusimcontext.c
|
2021-11-11 21:36:12 +01:00
|
|
|
@@ -1497,7 +1497,10 @@ _set_cursor_location_internal (IBusIMContext *ibusimcontext)
|
|
|
|
|
|
|
|
#if GTK_CHECK_VERSION (3, 98, 4)
|
|
|
|
#elif GTK_CHECK_VERSION (2, 91, 0)
|
|
|
|
- area.y += gdk_window_get_height (ibusimcontext->client_window);
|
|
|
|
+ if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) {
|
|
|
|
+ area.x = 0;
|
|
|
|
+ area.y += gdk_window_get_height (ibusimcontext->client_window);
|
|
|
|
+ }
|
|
|
|
#else
|
|
|
|
if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) {
|
|
|
|
gint w, h;
|
|
|
|
|