-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications and other popups are treated like "normal" windows on Plasma Wayland #118650
Comments
Oh, my intuition tells me this could be the root cause of the totally-wonky Plasma Mobile notifications. |
@samueldr - I found this: https://community.kde.org/Plasma/Notifications#DesktopEntry_in_notifyrc I haven't looked through the code yet (I'm not at all familiar with the plasma code) but it sure sounds like there is a disconnect between kwin, application and desktop file.
|
I don't think this is relevant to the "rendering" bits of the notifications. I'm not an expert either, but to me this sounds like it is concerned with the communication between apps and the daemon. BUT, "However, KNotifications uses the application name for identification rather than the desktop entry" is possibly a similar issue to the one we're having. But it's likely to be something concerning the kwin/KNotifications relationship, rather than KNotifications/app relationship. |
The bug @peterhoeg links says that the bug was fixed by these git commit back in the day: |
So I've followed the instructions given to @peterhoeg in the 2nd bug report |
Of note:Entire window class is |
I would bet this is the issue. |
@samueldr where do you think we shpuld look specifically? |
|
@samueldr any news? |
(All looked at under Plasma Mobile...) My current line of thoughts is that the window role is lost for some reason. This is supported by your previous screenshots, and my testing under Plasma Mobile shows me the same issue where window type is Normal. AFAICT this condition is never true: But if I force any --- a/xdgshellclient.cpp
+++ b/xdgshellclient.cpp
@@ -926,6 +926,7 @@ bool XdgToplevelClient::acceptsFocus() const
}
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification ||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) {
+ return false;
return m_plasmaShellSurface->panelTakesFocus();
}
} This is not a solution, far from it. I simply don't know how to debug this kind of issues, and am learning along the way how all of this is setup within kwin, plasma, and friends. This also does not affect the window sizing in Plasma Mobile, but it changes something for sure since it won't put the notification halfway off-screen. I would assume if the window never lost it |
Can I trouble you to report your findings on the KDE bug tracker? I'm sure the guys over there are able to help.
|
I suspect #107595 is connected |
@peterhoeg I don't have much confidence in my findings. Reading through kwin's and plasma-* and kwayland* projects a bit hapazardly I found out that maybe it's totally expected that window roles are normal under wayland. Though I'm not confident either in those findings. EDIT: yeah, forcing the Notification role through |
@pasqui23 AFAIK this patch solved that. |
Looks like I'm stabbing in the dark, at random, and only hitting irrelevant bits. I'd need a KDE/Plasma person to take a better look at that. It is exhausting to look into, since I'm mostly learning everything from scratch on the spot. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/3 |
Also also no clock widget |
Ok how do we contact the KDE devs for guidance? |
So here are the 3 commits that fixed this problem back in the day @samueldr This suggest that window roles are not expected to be "Normal" for notification, |
So controlling the window type on a notification turn out that on X11 is revealed as empty. |
Devs, how can we, community, help to give some traction to this issue? |
(Tangentially related, I'll be trying with the plasma-mobile PR tomorrow. Hopefully this is what fixes the issues there too.) |
@CertainLach do you have a good enough mental model of what is happening to know if, instead of (ab)using the environment through tons of wrappers, we'd instead allow loading Qt plugins for all dependencies intrinsically regardless of the environment? Note that I'm not talking about "unwrapping" the name of I still think that using wrappers and the environment is the worst misfeature in NixOS integration we're still doing. (Not specific to Qt.) |
If the wrapper magic is the problem, I wonder if the "proper" solution would also make screensharing/recording via pipewire, ssh-agent and fcitx (and presumably other IMEs) finally work on wayland as well. |
@jansol unlikely that it alone would be the fix, but it might be part of making things easier. It seems that their design for Wayland application "authentication" relies, among other things, on looking at the application names (from Then there's the possibility that " It's possible every service needs to be tracked down to their hardcoded special casing in the different Wayland components to know for sure how they work. |
@CertainLach's fixes works for Plasma Mobile! |
I agree with that qt wrapping is a mess, but i see the better story with qt plugins much as something like:
This way it would be explicit, and pure enough to not break things with errorously loaded plugins |
Breaks on non-NixOS systems, user profiles or
The way I implemented in that old PR was pure from the inputs of a given derivation, while still staying compatible with the less pure automatic loading of plugins from profile directories that is already in use. Though this discussion should probably be had elsewhere than this specific issue... Sorry for starting to roll the ball about that in the wrong location :). |
Reopening; I think it also requires #139459, though I never tested for myself. |
#139459 isn't required for this fix, but it fixes other possible problems, kwin has some plugins with hardcoded |
Huge thanks for fixing this! |
With #139537 applied running |
I can also confirm several other plasma wayland issues I was experiencing got fixed by #139537 :
|
@CertainLach can you please submit your PR that fixed this at the bounty page as a solution (to claim the bounty)? |
Describe the bug
When running Plasma Wayland, notifications and krunner pop-downs are treated like first-class windows and therefore take focus and appear in the task manager.
This used to be an issue back in the day (https://bugs.kde.org/show_bug.cgi?id=365107) so this is in all likelyhood something we do (wrong) on our side.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Notifications and similar should not be treated as a regular window and therefore not show in task manager or receive focus (krunner should still have focus of course).
Notify maintainers
Cc: @NixOS/qt-kde
Metadata
"x86_64-linux"
Linux 5.11.11, NixOS, 21.05.git.d3ff65233f9M (Okapi)
yes
yes
nix-env (Nix) 2.4pre20210326_dd77f71
""
""
/nix/store/w9zhp284bnx3f1ma6mdbsw008jpnq15v-nixpkgs_unstable
References:
The text was updated successfully, but these errors were encountered: