Fix: incorrect rectangle region passed to Wayland

GHOST's rectangle is bottom-right whereas Wayland uses top-left.
This commit is contained in:
Campbell Barton 2026-07-29 14:54:43 +10:00
parent 4fe17ef6be
commit f6cc0b74ec
2 changed files with 4 additions and 3 deletions

View file

@ -366,8 +366,8 @@ class GHOST_IWindow {
/**
* Enable IME attached to the given window, i.e. allows user-input
* events to be dispatched to the IME.
* \param x: Requested x-coordinate of the rectangle.
* \param y: Requested y-coordinate of the rectangle.
* \param x: Requested left of the rectangle.
* \param y: Requested lower edge of the rectangle.
* \param w: Requested width of the rectangle.
* \param h: Requested height of the rectangle.
* \param completed: Whether or not to complete the ongoing composition.

View file

@ -2484,7 +2484,8 @@ GHOST_Context *GHOST_WindowWayland::newDrawingContext(GHOST_TDrawingContextType
void GHOST_WindowWayland::beginIME(
const int32_t x, const int32_t y, const int32_t w, const int32_t h, const bool completed)
{
system_->ime_begin(this, x, y, w, h, completed);
/* WAYLAND anchors the rectangle at its top-left. */
system_->ime_begin(this, x, y - h, w, h, completed);
}
void GHOST_WindowWayland::endIME()