https://bugs.kde.org/show_bug.cgi?id=501101

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |quantum_misentanglement@pro
                   |                            |tonmail.com

--- Comment #1 from [email protected] ---
Hi, I have also encountered that problem. Plasma/KWin 6.6.6, Wayland, switching
policy "Application".

STEPS TO REPRODUCE
1. Set two layouts: A and B switching policy "Application".
2. Bind "Switch to Last-Used Keyboard Layout".
3. In window X with layout A active, press the shortcut to switch to B.
4. Activate window Y with last layout A (or open a new window, which gets the
default layout A).
5. Press the shortcut.

OBSERVED
Nothing happens, on this and every further press, until a different layout is
selected explicitly (e.g. via a per-layout shortcut).

EXPECTED
Switches to B.

SUSPECTED CAUSE
The per-window/per-app policies restore a window's layout through
Policy::setLayout() (src/keyboard_layout_switching.cpp), which calls
m_xkb->switchToLayout() directly and bypasses
KeyboardLayout::checkLayoutChange() (src/keyboard_layout.cpp). As a result,
neither KeyboardLayout::m_lastUsedLayout nor KeyboardLayout::m_layout is
updated on window activation. Whe m_lastUsedLayout equals the current layout
(A), it switches A->A. From then on every step is a no-op.

Having Policy::setLayout() keep KeyboardLayout's m_layout and m_lastUsedLayout
in sync might fix it. Similar but different bug:
https://bugs.kde.org/show_bug.cgi?id=467992 

I think this bug should probably get moved to kwin/input, rather than
kglobalaccel.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to