Bug 435544 - Application focus issue
Summary: Application focus issue
Status: CONFIRMED
Alias: None
Product: yakuake
Classification: Applications
Component: general (show other bugs)
Version: 3.0.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL: https://invent.kde.org/utilities/yaku...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-09 11:23 UTC by Stas Egorov
Modified: 2023-08-27 19:33 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kwin rule (48.45 KB, image/png)
2023-03-06 12:36 UTC, Vladimir Yerilov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stas Egorov 2021-04-09 11:23:45 UTC
SUMMARY


STEPS TO REPRODUCE
1. Open Yakuake console
2. Switch to any other application
3. Minimize this application
4. Try to input any text

OBSERVED RESULT

No text is entered into the Yakuake window

EXPECTED RESULT

The text must be entered into the Yakuake window. Upon closer inspection, it turns out that the Yakuake window is out of focus.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux with latest updates
KDE Plasma Version: -
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Sometimes Yakuake stays in the foreground even if another window is in focus. Because of this, when you enter a command into the console, it is entered into the window that is in the background. This is very confusing.
At the same time, of course, the checkbox "always stay at the top" is removed.
I have it reproduced in 100% of cases when opening/minimizing another window from the system tray if Yakuake was opened before. I use Xfwm & LXQt environment, maybe this is the case?
Comment 1 Henrique Sant'Anna 2021-05-17 18:56:15 UTC
This happens on Wayland or X11?

What is your window manager / compositor? Is this kwin?
Comment 2 Henrique Sant'Anna 2021-05-17 19:01:12 UTC
May be a duplicate of Bug 428383.
Comment 3 Stas Egorov 2021-05-17 20:03:23 UTC
X11
WM is Xfwm 4.16
Compose extension is disabled
Comment 4 Nikos Chantziaras 2021-08-17 15:01:34 UTC
I have the same issue with 21.08.0. I downgraded yakuake to 21.04.3 and it works fine again.

The bug is reproducible 100% of the time. Use the yakuake config shown below. Then open an application (Dolphin will do,) then focus yakuake, then click Dolphin's close button. Focus is not returned to yakuake, but to whatever window is behind it.

The commit that introduces the bug is 9202df97322ae2f58104e387e914de15b06644ff ("Fix Yakuake icon appearing in taskbar through Qt::Tool window flag"). Reverting this one commit fixes the issue. Of course, it probably re-introduces the issue it fixes.

It's pretty annoying :P I do "git commit", then my editor pops up, then I close it, then I type because I expect yakuake to have focus, but instead I end up typing into whatever window is behind yakuake, usually my IDE or Discord.

I'm using:

Gentoo Linux AMD64
X11 (xorg-server 1.20.13)
Plasma 5.22.4
Qt 5.12.2

My yakuake config:

[Animation]
Frames=0

[Appearance]
Skin=plastik_dark

[Desktop Entry]
DefaultProfile=Profile 1.profile

[Dialogs]
FirstRun=false

[Window]
Height=78
KeepAbove=false
Position=46
ShowSystrayIcon=false
ToggleToFocus=true
Width=72
Comment 5 Stas Egorov 2021-08-18 17:13:28 UTC
(In reply to Nikos Chantziaras from comment #4)

> I have the same issue with 21.08.0. I downgraded yakuake to 21.04.3 and it
> works fine again.
> 
> [...]
>
> The commit that introduces the bug is
> 9202df97322ae2f58104e387e914de15b06644ff ("Fix Yakuake icon appearing in
> taskbar through Qt::Tool window flag").

But I wrote this bugreport in April, and the commit you mentioned was added in May.
Comment 6 samurai.no.dojo 2021-08-23 13:22:56 UTC
I can report this behaviour too on Manjaro (Archlinux) with mentioned versions of yakuake (21.08.0-1, broken and 21.04.3-1 working).
My problem is caused by ssh-agent connection confirmation dialogue with same results as described by Sats.
Comment 7 samurai.no.dojo 2021-08-23 13:27:11 UTC
(In reply to samurai.no.dojo from comment #6)
> I can report this behaviour too on Manjaro (Archlinux) with mentioned
> versions of yakuake (21.08.0-1, broken and 21.04.3-1 working).
> My problem is caused by ssh-agent connection confirmation dialogue with same
> results as described by Sats.

I am sorrs we shpoould create another bug with Nikos.
Comment 8 Andreas Sturmlechner 2021-09-23 08:35:35 UTC
Please test with 21.08.1.
Comment 9 Stas Egorov 2021-09-23 08:48:17 UTC
(In reply to Andreas Sturmlechner from comment #8)
> Please test with 21.08.1.

There is no difference in behavior from previous versions.
Comment 10 George Diamantopoulos 2021-10-29 16:47:19 UTC
I think I've also hit this bug in the past few months. It's especially annoying when using gpg-agent with pinentry-qt5, because working on a terminal will often produce a pop-up to enter a passphrase.

Previously, entering the passphrase in the pop up would return focus to yakuake and one could continue working in the terminal. With this bug, however, one has to use the mouse to restore focus to yakuake before being able to type again...
Comment 11 Kai Eckert 2023-03-06 10:51:32 UTC
I can confirm that the bug still exists, it annoys me to the point that I had to switch off the "keep open" option. Nothing worse than constantly accidently writing stuff into the wrong window.

Yakuake 22.12.3
Plasma 5.27.2
Comment 12 Vladimir Yerilov 2023-03-06 12:36:32 UTC
Created attachment 157036 [details]
Kwin rule

(In reply to Kai Eckert from comment #11)
> I can confirm that the bug still exists, it annoys me to the point that I
> had to switch off the "keep open" option. Nothing worse than constantly
> accidently writing stuff into the wrong window.
> 
> Yakuake 22.12.3
> Plasma 5.27.2

To work it around, go to Window Management -> Window Rules, and a new rule for yakuake as shown on atached file.
Comment 13 Stas Egorov 2023-08-27 19:33:05 UTC
It looks like the behavior depends on the window manager.

On Xfwm and KWin this bug is reproducible.
Not reproduce on Openbox.

That being said, I'm using lxqt as my desktop environment.