ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

Taskbar with multimonitor and restart or theme change #157

Closed jjess closed 8 months ago

jjess commented 8 months ago

Hi:

I use icewm with two monitors (laptop and external). Main display is the external monitor. In order to have the taskbar in the external monitor I need this in the .icewm/preferences:

XineramaPrimaryScreen=1 # [0-63]

Everything ok with that. But if I restart Icewm or change the theme the taskbar moves to the another display (I guess the numberd with 0 for Xinerama).

Some details of my layout:

icesh randr 0: 1920x1080+0+0 1: 1920x1080+1920+0 2: 0x0+0+0 3: 0x0+0+0

icesh xinerama 0: 1920x1080+0+0 1: 1920x1080+1920+0

External display is located on the left, and laptop display is on the right. So I can move the mouse from left to right and it changes from external to laptop. One could say that the numbered 1 is on the right, but really is on the left.

Anyway, any icewm restart or theme change shouldn't lead (IMHO) to a change in the taskbar position, should it?

Thanks for keep maintaining Icewm, it's a wonderful wm ... everything works as intended (despite of this issue), much much better than the most known.

BR,

Jes

gijsbers commented 8 months ago

You are right, a restart shouldn't make a difference. It is unclear what causes this. Maybe a timing issue? This commit enforces the proper screen. You can test to see if it fixes the problem for you.

jjess commented 8 months ago

Hi:

Thank you for quick response. But the problem remains. My system is FreeBSD 14, and the 1.4-BRANCH doesn't compile (problems with autogen.sh and configure.sh). So I used the freebsd port with version 3.4.5_2 and manually modified src/wmtaskbar.cc. But after compile, install, logout/login, the problem is still present.

Thanks

jjess commented 8 months ago

Another test. Behavior is now fixed configuring the xorg.conf for my laptop with the right monitor outputs. So, despite of icewm try to move the taskbar when restarting to the first monitor/screen , with this setup, the first monitor/screen is always the external monitor, so my issue is fixed.

The relevant xorg.conf configuration:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    # DFP-3.1 Benq
    # DP-4   Laptop
    Option         "nvidiaXineramaInfoOrder" "DFP-3.1"
    Option         "metamodes" "DP-3.1: nvidia-auto-select +0+0, DP-4: nvidia-auto-select +1920+0"     
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

The test has been done with your last commit in 1.4-BRANCH. So the problem could be considered as fixed, but I'm not sure if it's related to icewm or my setup... Anyway, thank you very much.

Jes

gijsbers commented 8 months ago

Maybe use the XRRPrimaryScreenName instead of XineramaPrimaryScreen?

jjess commented 8 months ago

Please, close this issue. Probably was due to my previously wrong monitor setup in xorg.conf. If I remove any xinerama and metamodes in xorg.conf, icewm starts as intended and restarts/theme changes don't produce any unexpected behavior. So, it was my setup. I thought it was an icewm issue because I hadn't any problem in KDE or xfce. I suppose icewm works different but not wrong.

Thanks for your support.

Jes