ibus: SetCursorLocationRelative is not a caret

A GTK client on the Wayland backend sends this where an X11 one sends
SetCursorLocation, and ictab did not list it, so libdbus answered
UnknownMethod.  Accept it and throw it away: the absolute translation
sits inside GDK_IS_X11_DISPLAY, so the coordinates are surface local,
and ibus's own daemon will not hand them to an engine either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-17 18:13:58 +09:00
parent e93ec43706
commit 059e8bbc75
2 changed files with 6 additions and 1 deletions

6
ibus.c
View File

@@ -889,7 +889,10 @@ handlecursor(DBusConnection *c, DBusMessage *m, Ictx *ctx)
return reply(c, m, DBUS_TYPE_INVALID, nil);
}
/* SetEngine: there is one engine, so any name is fine. */
/*
* Accepted and thrown away: there is one engine, so any name is fine,
* and a relative cursor location is surface local, not a caret.
*/
static DBusHandlerResult
handleok(DBusConnection *c, DBusMessage *m, Ictx*)
{
@@ -908,6 +911,7 @@ static struct {
{"Reset", "", handlereset},
{"Destroy", "", handledestroy},
{"SetCursorLocation", "iiii", handlecursor},
{"SetCursorLocationRelative", "iiii", handleok},
{"SetCapabilities", "u", handlecap},
{"SetEngine", "s", handleok},
};

View File

@@ -128,6 +128,7 @@ runcontract(char *address)
"SetEngine",
"SetCapabilities",
"SetCursorLocation",
"SetCursorLocationRelative",
};
DBusConnection *conn;
char path[96];