Skip to content
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

xmonad hides xfce-panel #194

Closed
2 tasks done
VictorDenisov opened this issue Jun 24, 2017 · 26 comments
Closed
2 tasks done

xmonad hides xfce-panel #194

VictorDenisov opened this issue Jun 24, 2017 · 26 comments

Comments

@VictorDenisov
Copy link

VictorDenisov commented Jun 24, 2017

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

@0Arian
Copy link

0Arian commented Jun 25, 2017

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

@geekosaur
Copy link
Contributor

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

@VictorDenisov
Copy link
Author

VictorDenisov commented Jun 26, 2017

@geekosaur who do you mean by they? xfce?

@VictorDenisov
Copy link
Author

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

@VictorDenisov
Copy link
Author

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
Copy link
Author

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.

@ellakk
Copy link

ellakk commented Jun 26, 2017

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.

@VictorDenisov
Copy link
Author

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
Copy link
Author

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

@arvidj
Copy link

arvidj commented Mar 23, 2018

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

@nesaro
Copy link

nesaro commented Jun 23, 2018

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

@fleutot
Copy link

fleutot commented May 26, 2020

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.

@bradrn
Copy link

bradrn commented Mar 21, 2023

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

@slotThe
Copy link
Member

slotThe commented Mar 21, 2023

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

@bradrn
Copy link

bradrn commented Mar 21, 2023

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

@bradrn
Copy link

bradrn commented Mar 21, 2023

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.

@fleutot
Copy link

fleutot commented Mar 21, 2023

Same here with 4.14:

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

@slotThe
Copy link
Member

slotThe commented Mar 21, 2023

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

@fleutot
Copy link

fleutot commented Mar 21, 2023

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.

@bradrn
Copy link

bradrn commented Mar 22, 2023

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.

@slotThe
Copy link
Member

slotThe commented Mar 22, 2023

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.

@fleutot
Copy link

fleutot commented Mar 22, 2023

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.

@geekosaur
Copy link
Contributor

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

@bradrn
Copy link

bradrn commented Mar 22, 2023

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

@slotThe
Copy link
Member

slotThe commented Mar 22, 2023

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.

psanford added a commit to psanford/public-machine-cfg that referenced this issue Mar 22, 2023
The actual fix here is adding the `docks` function. I think that
`desktopLayoutModifiers` is functionally the same as `avoidStruts`.

This came from
xmonad/xmonad-contrib#194 (comment)
@slotThe
Copy link
Member

slotThe commented Mar 26, 2023

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 #806 for that.

@slotThe slotThe closed this as completed Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants