
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
GNOME Shell
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.
For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.
Bugs should be reported to the GNOME bug tracking system.
Contributing
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.