summaryrefslogtreecommitdiff
path: root/ibus/936a0e76df79d92a8bdc03e9205330fb84a2083e.patch
blob: 1bf43c789c16d523af077281ded6fbf8e6829514 (plain)
    1 From 936a0e76df79d92a8bdc03e9205330fb84a2083e Mon Sep 17 00:00:00 2001
    2 From: Alynx Zhou <alynx.zhou@gmail.com>
    3 Date: Wed, 1 Sep 2021 12:04:12 +0900
    4 Subject: [PATCH] client/gtk2/ibusimcontext: Fix wrong cursor location in gtk3
    5  apps
    6 
    7 If you apply this patch in your tarball, please also apply this to
    8 client/gtk3/ibusimcontext.c besides client/gtk2/ibusimcontext.c .
    9 
   10 BUG=https://github.com/ibus/ibus/issues/2337
   11 ---
   12  client/gtk2/ibusimcontext.c | 5 ++++-
   13  1 file changed, 4 insertions(+), 1 deletion(-)
   14 
   15 diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
   16 index da9a402ff..b1ccede95 100644
   17 --- a/client/gtk2/ibusimcontext.c
   18 +++ b/client/gtk2/ibusimcontext.c
   19 @@ -1497,7 +1497,10 @@ _set_cursor_location_internal (IBusIMContext *ibusimcontext)
   20  
   21  #if GTK_CHECK_VERSION (3, 98, 4)
   22  #elif GTK_CHECK_VERSION (2, 91, 0)
   23 -    area.y += gdk_window_get_height (ibusimcontext->client_window);
   24 +    if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) {
   25 +        area.x = 0;
   26 +        area.y += gdk_window_get_height (ibusimcontext->client_window);
   27 +    }
   28  #else
   29      if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) {
   30          gint w, h;

Generated by cgit