keyboard: Listen to IbusPanelService::focus-in/out to track focus changes

In X11 there's no input panel state requests, so restore the previous behavior
that focused entries would always toggle the OSK on there.
This commit is contained in:
Carlos Garnacho
2018-09-18 12:54:29 +02:00
committed by Florian Müllner
parent 7ea034c719
commit 11fb91f60f
2 changed files with 21 additions and 0 deletions

View File

@ -119,6 +119,11 @@ var IBusManager = new Lang.Class({
let cursorLocation = { x, y, width: w, height: h };
this.emit('set-cursor-location', cursorLocation);
});
this._panelService.connect('focus-in', (panel, path) => {
if (!GLib.str_has_suffix(path, '/InputContext_1'))
this.emit ('focus-in');
});
this._panelService.connect('focus-out', () => { this.emit('focus-out'); });
try {
// IBus versions older than 1.5.10 have a bug which