Skip to content

Commit

Permalink
Do not commit by index when OSK is visible
Browse files Browse the repository at this point in the history
Resolves: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5865

Currently works only on Gnome Wayland.

On Gnome Xorg it works only in gnome-shell entry widgets like “Run a
Command” (Alt+F2) but not in other programs like gnome-terminal and
gedit.
  • Loading branch information
mike-fabian committed Oct 9, 2022
1 parent d6ebed1 commit ce36d7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/hunspell_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,12 @@ def _commit_candidate(
:param extra_text: Additional text append to the commit,
usually a space
'''
if (hasattr(IBus.Capabilite, 'OSK')
and
self.client_capabilities & IBus.Capabilite.OSK):
LOGGER.info(
'OSK is visible: do not commit candidate by index %s', index)
return False
if (not self.get_lookup_table().get_number_of_candidates()
or self._lookup_table_hidden):
return False
Expand Down

0 comments on commit ce36d7c

Please sign in to comment.