Open IgnorantGuru opened 11 years ago
It should be noted that this problem of SpaceFM not seeing the extra monitor added by xrandr is also due to the lack of screen size change detection. Otherwise it would have detected the screen size change and expanded the desktop.
The workaround was to run xrandr then spacefm --desktop.
Received elsewhere:
You do not have to change anything in your setup to test this case. Just run:
xrandr -q
to see current output name and supported modes. Then run:
xrandr --output $OUTPUTNAME --mode ${WIDTH}x${HEIGHT}
to change screen resolution. Then:
xrandr --auto
to revert back to native resolution. That's it. You can also use arandr or lxrandr frontends.
The simplest desired behavior of SpaceFM window is to allways cover entire screen and place icons inside WM working areas.
As for multimonitor setups, WAs can be weird with overlapping outputs, but I guess these are bugs in WM's.
Thanks, your instructions work except for the xrandr --auto.
I did some testing on this. The gdkscreen functions always report the screen size as it was when spacefm first starts, and the gdkscreen's 'size-changed' signal is not emitted when the mode is changed by xrandr. Further, I wrote a function to get the screen size directly from the X server bypassing gdk functions, and X too reports the original screen size (from when spacefm first starts). So if even X is reporting the wrong size, I don't see how anything will work.
Could this be an openbox problem? That's the only WM I tried thus far.
I have added that code to the 'resize' branch in case anyone would like to test it. (Use the BUILD NEXT instructions in README, changing branch name 'next' to 'resize' in those instructions.)
In that branch, you can click on the desktop to print the current screen size to the terminal spacefm was run in. Here's what I get for output (comments show commands issued in another terminal):
# xrandr --output DVI-I-1 --mode 1280x1024
# spacefm --desktop
set wallpaper: gdkscreen size = 1280, 1024
# xrandr --output DVI-I-1 --mode 1920x1200
working area is resized x,y=0, 25 w,h=1920, 1175
gdkscreen size = 1280, 1024
set wallpaper: gdkscreen size = 1280, 1024
button: gdkscreen size = 1280, 1024
XDisplay size: 1280, 1024
# xrandr --output DVI-I-1 --mode 1280x1024
working area is resized x,y=0, 25 w,h=1280, 999
gdkscreen size = 1280, 1024
set wallpaper: gdkscreen size = 1280, 1024
button: gdkscreen size = 1280, 1024
XDisplay size: 1280, 1024
I think it may be wise to test this with some other WMs. The only other thing I can think of would be to research how other programs detect this, although that can be very time consuming. The bit of research I did indicated getting the screen size via gdk or Xlib, both of which fail here.
I've tested resize branch with xfwm, same results. Both XDisplay and gdkscreen report launch time size, not the actual size.
I noticed this problem when applying a desktop background. My initial setup was Debian "testing" with LXDE. PCmanfm was the default FM and the desktop background was fine even when changed to 1920x1200. Then I changed the desktop manager to Spacefm and as you point out earlier the changes in xrandr from 1680x1050 (my laptop) to 1920x1200 (my monitor) do not take effect. I need to kill Spacefm and restart it for it to reset the desktop resolution.
This is a continuation of the resize comments included in issue #248, attempting to get SpaceFM desktop to resize when the screen size is changed with xrandr.