gnome-shell/js/misc
Marco Trevisan (Treviño) 1cc766d636 ibusManager, inputMethod: Cancel async ibus calls chain on disconnect
The shell tries to spawn the ibus daemon on startup if unavailable, however
as per commit 8adfc5b1 we also force restarting it once the X11 server is
available.
Unfortunately this could cause a race if we disconnect while we were already
connected to an ibus daemon, but still in the process of going through the
various nested calls.
In fact the ::disconnect callback didn't stop any further async ibus call
that, even if failing, would have eventually triggered the emission of a
'ready' signal and to the Keyboard's callback, leading under X11 to a full
grab owned by ibus daemon.

In order to avoid this and keep control of the calls order, use in both
IbusManager and InputMethod a cancellable that is setup before connecting to
the bus, and that is cancelled on disconnection.
Then handle the finish() calls properly, using try/catch to validate the
returned value, taking in account the potential error and just not
proceeding in case of cancellation.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1712
2019-10-02 18:19:53 +02:00
..
config.js.in fileUtils: Add helper for loading D-Bus XML from resource 2018-09-17 07:34:49 +00:00
extensionUtils.js extensionUtils: Check version variable for undefined first 2019-09-12 10:24:49 +00:00
fileUtils.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
gnomeSession.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
history.js cleanup: Remove trailing spaces 2019-09-15 16:02:45 +02:00
ibusManager.js ibusManager, inputMethod: Cancel async ibus calls chain on disconnect 2019-10-02 18:19:53 +02:00
inputMethod.js ibusManager, inputMethod: Cancel async ibus calls chain on disconnect 2019-10-02 18:19:53 +02:00
introspect.js introspect: Check whitelist also for GetRunningWindows() 2019-09-18 16:17:25 +00:00
jsParse.js cleanup: Disambiguate assignments in arrow functions 2019-09-15 16:02:45 +02:00
keyboardManager.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
loginManager.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
meson.build networkAgent: Pick up VPN service dir from pkg-config 2018-01-22 08:44:19 +01:00
modemManager.js cleanup: Fix up "special" comments 2019-09-15 16:02:45 +02:00
objectManager.js cleanup: Prefer template strings 2019-07-05 11:32:31 +00:00
params.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
permissionStore.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
smartcardManager.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
systemActions.js cleanup: Avoid unnecessary parentheses in arrow functions 2019-09-15 16:02:45 +02:00
util.js util: Handle trailing LTR/RTL markers in URLs 2019-09-16 20:41:47 +00:00
weather.js weather: Pick up original settings values 2019-08-07 18:53:41 +00:00