inputMethod: Also forward TERMINAL input purpose

It was added relatively recently (1.5.24), so check if it exists first.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5958
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2511>
This commit is contained in:
Jonas Ådahl 2022-10-14 21:41:00 +02:00
parent 82f13c3a10
commit dfcab5a2b1

View File

@ -273,6 +273,9 @@ var InputMethod = GObject.registerClass({
ibusPurpose = IBus.InputPurpose.NAME;
else if (purpose == Clutter.InputContentPurpose.PASSWORD)
ibusPurpose = IBus.InputPurpose.PASSWORD;
else if (purpose === Clutter.InputContentPurpose.TERMINAL &&
IBus.InputPurpose.TERMINAL)
ibusPurpose = IBus.InputPurpose.TERMINAL;
this._setTerminalMode(
purpose === Clutter.InputContentPurpose.TERMINAL);