Bug 450014

Summary: Unable to switch input method or open Maliit virtual keyboard in Overview search
Product: [Plasma] kwin Reporter: countfatcode <countfatcode>
Component: effects-overviewAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: artetk, laichiaheng, nate, plasma-bugs, postix, qydwhotmail, wengxt, wlmqljj
Priority: NOR    
Version: 5.24.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:

Description countfatcode 2022-02-11 15:13:55 UTC
When I open Overview effect, and input English character, it works nice. When I want to input some chinese characters using fcitx5-rime, it will do nothing. No characters will be inputed under cursor.

Reproducible: Always

Steps to Reproduce:
1. open Overview effect
2. transfer input method to fcitx5-rime
3. try to type on search
Actual Results:  
no character will be inputted

Expected Results:  
the chinese characters will be inputted under cursor
Comment 1 Nate Graham 2022-02-11 18:47:27 UTC
Does it work in other text fields in Plasma, such as the search field for the Application Launcher or the Networks applet?
Comment 2 countfatcode 2022-02-12 01:29:08 UTC
It works fine unless in overview
Comment 3 Weng Xuetian 2022-02-12 02:59:00 UTC
(In reply to Nate Graham from comment #1)
> Does it work in other text fields in Plasma, such as the search field for
> the Application Launcher or the Networks applet?

I already did some initial investigation 

This is solely a overview effect issue. I'm not exactly sure about wayland case in terms of making it work, because it would be like talk to kwin itself or implement a special QPA. I'd at least assume we can try to make it work under X11.

I think the reason behind this is that kwin is using QOffscreenWindow for this effect, and somehow setFocusObject is never triggered to the input method. Thus, input method doesn't know it the text field has focus and just bypass all the key event.
Comment 4 Zamundaaa 2024-07-16 13:39:54 UTC
*** Bug 490286 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2024-10-10 11:34:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6590
Comment 6 Bug Janitor Service 2024-11-05 16:41:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6735
Comment 7 David Edmundson 2025-01-27 10:21:08 UTC
Git commit 5dca0553899ae53da389dd74bb0c278036bcda83 by David Edmundson.
Committed on 27/01/2025 at 10:05.
Pushed by davidedmundson into branch 'master'.

input: Support Input Methods for internal windows and effects

The internal Qt QPA is now connected directly to InputMethod stack when any
item has focus.

Unlike the wayland protocol nothing is double buffered because we should
process everything before the next frame.

M  +1    -0    src/CMakeLists.txt
M  +12   -10   src/input.cpp
M  +68   -3    src/inputmethod.cpp
M  +9    -0    src/inputmethod.h
A  +198  -0    src/internalinputmethodcontext.cpp     [License: GPL(v2.0+)]
A  +67   -0    src/internalinputmethodcontext.h     [License: GPL(v2.0+)]
M  +11   -0    src/plugins/qpa/integration.cpp
M  +2    -0    src/plugins/qpa/integration.h

https://invent.kde.org/plasma/kwin/-/commit/5dca0553899ae53da389dd74bb0c278036bcda83
Comment 8 Nate Graham 2025-03-05 16:18:21 UTC
*** Bug 500940 has been marked as a duplicate of this bug. ***