xmonad-contrib
xmonad-contrib copied to clipboard
xmonad hides xfce-panel
Problem Description
When I configure xmonad with xfce on debian stretch(I'm adding xmonad --replace to applications autostart in xfce). After login xfce-panel initially shows up and then disappears.
When I do xmonad --replace with xfwm4 running everything works fine.
xfce4-panel --restart brings the panel back.
Configuration File
import XMonad
import XMonad.Config.Xfce
main = xmonad $ xfceConfig
Checklist
-
[x] I've read CONTRIBUTING.md
-
[X] I tested my configuration with xmonad-testing
Yeah this happens to me too. My friends solution was to delay the start of xmonad Basically create a bash file and then run the sleep command for like 2-3 seconds and then xmonad --replace afterwards. That solution didn't work with me so well so I just added xfce4-panel --restart as a startup command and it plays nicely 75% of the time
sigh what are they doing, setting the strut only after the window is mapped?
@geekosaur who do you mean by they? xfce?
I also can say that jessie xfce worked fine. I don't remember the version of jessie xfce though.
I probably should clarify how it looks. Basically when I'm on the first desktop I can't see anything and when I create any windows they don't show up. Then I switch to another desktop and I'm able to create a terminal window. It looks like at the picture. Once I restart panel, I can go back to the first desktop and close those windows. The windows are still not visible. I can only see their icons in the panel bar.
This is how first desktop looks like before closing all windows. The windows are not visible. I can judge that they exist only by their icons in the panel bar.
Hi!
I had the same problem when i started using xmonad with xfce but am currently working around it by making xfdesktop start with the "-D" (disable-wm-check) option".
To do this you need to run the following command:
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client4_Command -t string -t string -s xfdesktop -s -D
I also set xmonad as the default window manager instead of xfwm4 with xfconf-query (Dont add -r since xfwm4 never gets started when doing it this way):
xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xmonad
You can peek at these settings by starting the xfce settings editor and navigating to the xfce4-session category. I recommend looking at this for a better explanation about changing the default wm.
This advice didn't help. I ended up getting what I need by disabling save on exit and adding xmonad --replace to autostart. xmonad seems to behave very strangely when no other window manager had been running before xmonad was started.
Even my solution stopped working after sometime. Something is very wrong with the latest xfce.
The second part of the solution of @AirrBear worked for me so far, that is, adding xfce4-panel --restart as an automatic startup command.
I suspect it is related to this issue. Xmonad draws xfdesktop on top of whatever is on the screen, ignoring _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_DESKTOP
My panel seems to stay on top, until I float a window (tested right now with a terminal emulator, a chrome window...). As soon as I take out a tiled window to floating, the xfce4-panel gets sent to the bottom z.
I’m experiencing this issue too. For quite a while xfce4-panel and XMonad have worked well together without a problem, but then today XMonad suddenly stopped recognising it as a strut. It looks like I may be able to manually compensate using XMonad.Layout.Gaps, but that adds the gap to all my monitors (and is a rather hacky solution anyway).
@bradrn what version of xfce4-panel are you running? I just installed 4.18.2, and it works just fine; xprop correctly reports something along the lines of
[…]
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 27, 0, 0, 0, 0, 0, 0, 1079, 0, 0
[…]
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
[…]
$ xfce4-panel --version
xfce4-panel 4.18.2 (Xfce 4.18)
Meanwhile, xprop gives me:
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 3454, 7292
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
But XMonad doesn’t seem to be recognising it as a dock… how odd.
Same here with 4.14:
WM_WINDOW_ROLE(STRING) = "Panel"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
@bradrn @fleutot could either of you post (a minimal version of) your XMonad configs? Sadly I don't think I can help much until I can reproduce this :(
Sorry, but I'm not sure how to make it minimal. I understand too little to deem if something is irrelevant, with enough confidence.
Here is my config.
And here’s mine: https://github.com/bradrn/xmonadrc. When I get more time I can have a go at minimalising it, but I don’t think it’s overly big anyway.
Here is my config.
Are you sure this is the right config? It was last updated six years ago and still mentions xmobar as a bar.
And here’s mine: https://github.com/bradrn/xmonadrc. When I get more time I can have a go at minimalising it, but I don’t think it’s overly big anyway.
Thanks! What you're missing is the desktopLayoutModifiers (which at the moment is just avoidStruts, but that's not important) in your layoutHook. So, instead of
layout = xfcePanelGap $
Try
layout desktopLayoutModifiers $
instead. Ordinarily, desktopConfig (and thus also xfceConfig) applies this to the default layout, but since both are not functions, but just records that we modify, they can't apply it to your custom layout.
Sorry, wrong branch! Here comes.
When I re-read the thread, I think I misunderstand. My problem is not with other windows leaving space to the bar. Instead, I have a floating panel, but it gets sent to bottom z-order sometimes, so behind all other windows. Sorry if I was off topic.
For that to matter, windows must be ignoring the space assigned to the panel, so it's still relevant to this ticket.
@slotThe That works, thanks! Can’t remember what I was doing before, and it looks like I didn’t ever commit it to Git, but I don’t ever recall using desktopLayoutModifiers (or avoidStruts)… who knows how it worked before. Maybe I just got lucky.
Sorry, wrong branch! Here comes.
Thanks! You're not using any dock combinators, so I would expect nothing to be respected. You should at least add docks to your main function (like main = xmonad $ docks defaults), as well as avoidStruts to your layout hook. Stacking z-order reminds me of https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Util-Hacks.html#g:3 which may be interesting to you as well.
I think the problem here are all fixed, actually, so I will close. What I think is important to note is the fact that desktopLayoutModifiers only applies to the default layout, so I've opened https://github.com/xmonad/xmonad-contrib/issues/806 for that.