xmonad-contrib icon indicating copy to clipboard operation
xmonad-contrib copied to clipboard

xmonad hides xfce-panel

Open VictorDenisov opened this issue 8 years ago • 12 comments

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

VictorDenisov avatar Jun 24 '17 05:06 VictorDenisov

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

0Arian avatar Jun 25 '17 14:06 0Arian

sigh what are they doing, setting the strut only after the window is mapped?

geekosaur avatar Jun 25 '17 17:06 geekosaur

@geekosaur who do you mean by they? xfce?

VictorDenisov avatar Jun 26 '17 08:06 VictorDenisov

I also can say that jessie xfce worked fine. I don't remember the version of jessie xfce though.

VictorDenisov avatar Jun 26 '17 08:06 VictorDenisov

2017-06-26-010930_1920x1080_scrot 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.

VictorDenisov avatar Jun 26 '17 08:06 VictorDenisov

2017-06-26-011516_1920x1080_scrot 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.

VictorDenisov avatar Jun 26 '17 08:06 VictorDenisov

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.

ellakk avatar Jun 26 '17 19:06 ellakk

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.

VictorDenisov avatar Jun 27 '17 05:06 VictorDenisov

Even my solution stopped working after sometime. Something is very wrong with the latest xfce.

VictorDenisov avatar Jul 02 '17 21:07 VictorDenisov

The second part of the solution of @AirrBear worked for me so far, that is, adding xfce4-panel --restart as an automatic startup command.

arvidj avatar Mar 23 '18 12:03 arvidj

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

nesaro avatar Jun 23 '18 15:06 nesaro

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.

fleutot avatar May 26 '20 13:05 fleutot

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 avatar Mar 21 '23 04:03 bradrn

@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
[…]

slotThe avatar Mar 21 '23 06:03 slotThe

$ xfce4-panel --version
xfce4-panel 4.18.2 (Xfce 4.18)

bradrn avatar Mar 21 '23 06:03 bradrn

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.

bradrn avatar Mar 21 '23 06:03 bradrn

Same here with 4.14:

WM_WINDOW_ROLE(STRING) = "Panel"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK

fleutot avatar Mar 21 '23 09:03 fleutot

@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 :(

slotThe avatar Mar 21 '23 09:03 slotThe

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.

fleutot avatar Mar 21 '23 10:03 fleutot

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.

bradrn avatar Mar 22 '23 00:03 bradrn

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.

slotThe avatar Mar 22 '23 07:03 slotThe

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.

fleutot avatar Mar 22 '23 07:03 fleutot

For that to matter, windows must be ignoring the space assigned to the panel, so it's still relevant to this ticket.

geekosaur avatar Mar 22 '23 07:03 geekosaur

@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.

bradrn avatar Mar 22 '23 12:03 bradrn

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.

slotThe avatar Mar 22 '23 19:03 slotThe

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.

slotThe avatar Mar 26 '23 18:03 slotThe