summaryrefslogtreecommitdiff
path: root/app-i18n/ibus/files/ibus-1.5.25-ibusimcontext.patch
blob: 6187ff77fbac4f953075292dd7ecd29b73f64927 (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
28
29
30
31
32
33
34
35
https://github.com/ibus/ibus/issues/2337
https://bugs.gentoo.org/824494
---
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index da9a402..b1ccede 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;
diff --git a/client/gtk3/ibusimcontext.c b/client/gtk3/ibusimcontext.c
index da9a402..b1ccede 100644
--- a/client/gtk3/ibusimcontext.c
+++ b/client/gtk3/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;