Bug 496716

Summary: konsole receives partial focus when switching with Alt-Tab
Product: [Applications] konsole Reporter: Phil Hord <phil.hord>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: filip.kendes1
Priority: NOR    
Version: 24.08.3   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Phil Hord 2024-11-26 18:45:47 UTC
SUMMARY
When I switch to a console window with Alt-Tab, konsole acts like it has not fully received the focus until I press another key. The primary issue is that, while it's in this state, I cannot paste from the "primary" clipboard using the mouse middle-click into the console. Another symptom I notice is that the terminal cursor (the "caret") is a hollow block instead of a solid block.

Once I type something into the konsole, the caret becomes a solid block and middle-click pasting starts working again.

This started happening in Plasma 6.2, I think.

STEPS TO REPRODUCE
1. Highlight some text with the mouse
2. Use Alt-Tab to switch to a konsole window
3. Middle-click on the Konsole window

OBSERVED RESULT
The clipboard is not pasted into the console.
The terminal cursor/caret remains a hollow block.

EXPECTED RESULT
The clipboard is pasted into the console.
The terminal cursor/caret switches to a solid block.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.8.0-49-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10610U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20UCS4TR00
System Version: ThinkPad X1 Yoga Gen 5

ADDITIONAL INFORMATION
If I do not switch to the konsole with Alt-Tab, this problem does not occur.  If the konsole does not have the focus and I do any of the following, the solid caret appears and I am able to paste with middle-click button.

1. Left-click on the konsole window.
2. Right-click on the konsole window.
3. Middle-click on the konsole window.
4. Alt-tab to the konsole window and then press any key, even the Shift key.

The problem appears only when I use Alt-Tab to switch focus to the konsole window and do not press another key.  At this point, I cannot middle-click to paste into the window, and the caret remains a hollow block.

I have not changed any keyboard, mouse or konsole configurations recently that I can remember.
Comment 1 Phil Hord 2024-11-26 18:48:20 UTC
> 3. Middle-click on the konsole window.
To clarify, this pastes into the konsole window and I see a solid cursor only when the Konsole window did not already have the focus from Alt-Tab.
Comment 2 Filip 2024-11-26 19:22:47 UTC

*** This bug has been marked as a duplicate of bug 495741 ***