xmonad-contrib
xmonad-contrib copied to clipboard
Start menu dialog popup is broken in KDE 5
Problem Description
When clicking on the start menu button in the dock, it's supposed to display the start menu:
However, with XMonad the start menu doesn't display at all. Sometimes it will display for a fraction of a second, but then it immediately closes. This makes it impossible to use the start menu.
This also happens with some other dialogs which are spawned from the dock, such as the Search button, the window list button, etc.
Here is the xprop for the start menu dialog:
_KDE_NET_WM_SHADOW(CARDINAL) = 33554595, 33554597, 33554599, 33555399, 33555399, 33555399, 33555399, 33555399, 0, 0, 1, 1
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 392810
WM_TRANSIENT_FOR(WINDOW): window id # 0x2000039
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x1, 0x1, 0x136, 0x1fb, 0x3fc689ca, 0xbeb90c0a, 0xbeb90c0a, 0x0, 0xbf9ba0a6, 0x3f32584f, 0xbf9ba0a6, 0x0, 0xbdfb5f1c, 0xbdfb5f1c, 0x3fe516dc, 0x0, 0x3f04ccca, 0x3f04cccd, 0x3f04ccd1, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 1, 1, 310, 507
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _KDE_NET_WM_STATE_SKIP_SWITCHER, _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.plasmashell"
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) =
_NET_WM_NAME(UTF8_STRING) = "Plasma"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x200001b
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
window id # of group leader: 0x200001b
WM_CLIENT_MACHINE(STRING) = "nixos"
_NET_WM_PID(CARDINAL) = 2018
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554523
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: 0, 541
user specified size: 312 by 509
program specified minimum size: 312 by 509
program specified maximum size: 312 by 509
window gravity: Static
I believe the important part is the _NET_WM_STATE_SKIP_TASKBAR
and _NET_WM_STATE_SKIP_PAGER
, that is what distinguishes it from regular dialog popups.
Steps to Reproduce
Use the below configuration file, and then try to open the KDE start menu from the dock.
Configuration File
import XMonad
import XMonad.Config.Kde
main = xmonad $ kde4Config
Checklist
-
[X] I've read CONTRIBUTING.md
-
I tested my configuration
- [X] With
xmonad
version 0.15 - [X] With
xmonad-contrib
version 0.16
- [X] With
@TheMC47 IIRC you were also using KDE, right? Can you reproduce this?
Can you provide exactly how you're using xmonad with KDE?
@TheMC47 It's just a standard setup. I use NixOS Unstable, so I use the following options:
-
services.xserver.desktopManager.plasma5.enable = true;
-
services.xserver.windowManager.xmonad.enable = true;
-
services.xserver.windowManager.xmonad.enableContribAndExtras = true;
This installs xmonad 0.15, xmonad-contrib 0.16, and Plasma 5.23.5
I also followed these directions by creating a ~/.config/plasma-workspace/env/set_window_manager.sh
file which contains this code:
#!/bin/sh
export KDEWM="/nix/store/m4jxwgrkv4d1acppj6jzvw7b66zc6rqq-system-path/bin/xmonad"
(The exact filepath will vary, I used whereis xmonad
to locate it)
Lastly, this is a minimal config which reproduces the problem:
import XMonad
import XMonad.Config.Kde
main = xmonad $ kde4Config
Everything works fine, except for the dialog popups. It's all just standard Plasma stuff: Plasma dock, Plasma start menu, etc. I'm using the Application Menu
widget, not the Application Launcher
widget.
I've had this issue for years, but I just lived with it. I had fiddled around with my XMonad config to try and fix it, but nothing really worked.
By the way, I also have a similar problem... when I right click on the dock and click Enter Edit Mode
it will display the edit mode but then it immediately closes it, which makes it impossible to edit the widgets.
The config doesn't reproduce the error. I spun up a VM running NixOS and I added the lines to the nix configuration. As you can see in the screenshot, it works
@Pauan Since you're using NixOS anyways, any chance you could get us a full config (modulo the hardware settings) that we can try in a VM or something?
Sorry for the delay, I've been busy moving to another country. I'll try and get some precise reproduction steps, ideally in a VM.
I have the same issue with both krunner
and the start menu dialog
.
I've installed xmonad yesterday via stack
using the info from https://github.com/xmonad/xmonad/blob/master/INSTALL.md
Well, I'm not sure it's exactly the same issue. The menu does sometimes show (1 out of 10 times or something). So it can show, but most of the times it doesn't appear. But I do see something flicker very briefly.
versions:
- xmonad: 0.17.0.9
- plasmashell 5.24.5
relevant portion of the xmonad config
myManageHook :: ManageHook
myManageHook = composeOne
[ isKDETrayWindow -?> doIgnore <+> hasBorder False
, (className =? "plasmashell") -?> doFloat <+> hasBorder False
, (className =? "krunner") -?> doFloat <+> hasBorder False
, (className =? "1Password") -?> doCenterFloat <+> hasBorder False
, transience
, isDialog -?> doCenterFloat
]
myKeys :: [(String, X ())]
myKeys =
[ ("M-p", spawn "dbus-send --print-reply --dest=org.kde.krunner /App org.kde.krunner.App.display")
, ("M-S-p", spawn "dbus-send --print-reply --dest=org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.activateLauncherMenu")
, ("M-g", toggleScreenSpacingEnabled >> toggleWindowSpacingEnabled)
, ("M-S-g", setScreenSpacing (Border 4 4 4 4) >> setWindowSpacing (Border 4 4 4 4) >> setScreenSpacingEnabled True >> setWindowSpacingEnabled True)
]
If I change (className =? "plasmashell") -?> doFloat <+> hasBorder False
to (className =? "plasmashell") -?> doIgnore <+> hasBorder False
then the window always shows, but of course it doesn't have focus and I can't type anything into it, so not a solution.
Is this by any chance the same issue as https://github.com/xmonad/xmonad/issues/174#issuecomment-1118020397? If so, it requires a patch to KDE to fix.
That looks indeed like that bug, thanks!
@tcoopman Well, I'm not sure it's exactly the same issue. The menu does sometimes show (1 out of 10 times or something). So it can show, but most of the times it doesn't appear. But I do see something flicker very briefly.
Yes, that's exactly the same issue I have. For me, both krunner and the start menu are broken. I've only had this issue with plasmashell stuff, not with any other window.
I will close this as a duplicate of https://github.com/xmonad/xmonad/issues/174 then