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;