Skip to content

Commit

Permalink
Merge branch 'f36-devel' into f36-release
Browse files Browse the repository at this point in the history
  • Loading branch information
M4rtinK committed Apr 12, 2022
2 parents 0723985 + 93cb97a commit fcc3981
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
22 changes: 22 additions & 0 deletions docs/release-notes/detach-keyboard-config-from-Live.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:Type: GUI
:Summary: Split keyboard configuration between Live media and system to be installed (#2016613)

:Description:
The keyboard switching in the Anaconda installer on the Live media did not behave as expected
on Wayland based environments. When users changed the keyboard layout configuration that
configuration was reflected in the Live environment. However, if users pressed modifier keys
(CTRL or SHIFT) the keyboard specified by the Anaconda installer was changed back for the Live
environment. That is the result of how the Wayland protocol handles keyboard layout.

To avoid this unexpected behavior Anaconda will no longer control keyboard layout
configuration of the Live systems on Wayland Live environment. The keyboard configuration set
by Anaconda on the Live environment will be reflected only to the installed system.

BEWARE::

This means that users have to pay attention that their passwords are written by the correct
layout in the installer running inside the Live environment to be able to use the password in
the system after installation.
:Links:
- https://bugzilla.redhat.com/show_bug.cgi?id=2016613
- https://github.com/rhinstaller/anaconda/pull/3912
20 changes: 14 additions & 6 deletions pyanaconda/ui/gui/spokes/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,20 @@ def completed(self):
if flags.flags.automatedInstall and not self._seen:
return False

# The currently activated layout is a different from the
# selected ones. Ignore VNC, since VNC keymaps are weird
# and more on the client side.
if not self._confirmed and not flags.flags.usevnc \
and self._xkl_wrapper.get_current_layout() not in self._l12_module.XLayouts:
return False
# Not confirmed by a user should we request the check?
if not self._confirmed:
# Not an issue where system keyboard configuration is not allowed
# This have to be before the `_xkl_wrapper.get_current_layout()` because on Wayland
# that call can fail in case when system has multiple layouts set.
if not keyboard.can_configure_keyboard():
return True

# Current activated layout is a different from the selected ones
if self._xkl_wrapper.get_current_layout() not in self._l12_module.XLayouts:
# Not an issue for VNC, since VNC keymaps are weird and more on the client side.
if flags.flags.usevnc:
return True
return False

return True

Expand Down

0 comments on commit fcc3981

Please sign in to comment.