With default Window Focus Behaviour settings on X11, using the emoji selector global shortcut when it is already open does not raise or focus the window. This makes using it annoying if the user doesn't remember to close it every time they're finished, having to search through their open windows for it.
The window is raised, see applets/kimpanel/backend/ibus/emojier/emojier.cpp:380, also see https://doc.qt.io/qt-5/qwindow.html#show. And this bug seems related to BUG 388562.
Alright, as I was doing more testing I found that this problem occurs with Plasma Discover as well, another QML(/Kirigami?) application. It will open packages/the updates page/etc. to requests, but not raise and focus the window. I've created a new user to test and found that this happens in a clean environment for both applications. Seems likely to be a Kirigami bug.
I tested with Spectacle, a QWidgets application, and it does _not_ exhibit this behaviour. Pressing the Screenshot button when the application is out of focus will correctly raise and focus Spectacle. System information, since I forgot to add it: Operating System: KDE neon 5.19 KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.0 Kernel Version: 5.4.0-47-generic OS Type: 64-bit Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz Memory: 3.8 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 520
I I recall that this is a regression in ApplicationLauncherJob: KWin isn't honoring the focus request because it thinks it's focus stealing because the job isn't marking the request correctly as a user-initiated action or something. I think we have a master bug tracking this somewhere...
Found it. *** This bug has been marked as a duplicate of bug 423857 ***
*** Bug 429573 has been marked as a duplicate of this bug. ***
Un-duping since the emoji picker will need an app-specific fix for this; see https://invent.kde.org/frameworks/kdbusaddons/-/merge_requests/5.
Git commit 9737ec943980d8e9d6a23d0b0c45e5bd0deafd04 by Nate Graham. Committed on 05/01/2021 at 03:18. Pushed by ngraham into branch 'master'. [emojier] Set window ID so it can be raised when already open FIXED-IN: 5.21 M +1 -1 applets/kimpanel/backend/ibus/emojier/CMakeLists.txt M +7 -0 applets/kimpanel/backend/ibus/emojier/emojier.cpp https://invent.kde.org/plasma/plasma-desktop/commit/9737ec943980d8e9d6a23d0b0c45e5bd0deafd04