blob: 376ccae56472c942dcf4f75d3daa487cf90df50d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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
Subject: [PATCH] client/gtk2/ibusimcontext: Fix wrong cursor location in gtk3
apps
---
client/gtk2/ibusimcontext.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index da9a402ff..b1ccede95 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -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;
|