Xfce window placement issue
Submitted by icy..@..ck.com
Assigned to Olivier Fourdan @olivier
Description
Running Xubuntu 17.10 on a machine with 3 monitors with 1080x1920 resolution (vertical arrangement). I am running into an issue with window placement when it spans two monitors.
Sample script to reproduce the behavior:
echo --- Info cat /etc/lsb-release wmctrl -m xfwm4 --version xdotool getdisplaygeometry
echo --- Starting mousepad and waiting for the window to be shown mousepad &>/dev/null & sleep 1
echo --- Initial setup is top left of the left monitor, size smaller than the monitor and not maximized xdotool search --onlyvisible --class mousepad windowactivate wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz xdotool getactivewindow getwindowname windowsize 300 300 windowmove 0 0 sleep 1 getwindowgeometry
echo --- Resize so it fully covers left and middle monitors let width=2*$(xdotool getdisplaygeometry|awk '{print $1}') xdotool getactivewindow getwindowname getwindowgeometry windowsize $width 300 sleep 1 getwindowgeometry
echo --- Move again to 0 0 xdotool getactivewindow getwindowname getwindowgeometry windowmove 0 0 sleep 1 getwindowgeometry sleep 1
echo --- Restore the initial setup xdotool getactivewindow getwindowname windowsize 300 300 windowmove 0 0 wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
kill %1
Output of the script:
--- Info DISTRIB_ID=Ubuntu DISTRIB_RELEASE=17.10 DISTRIB_CODENAME=artful DISTRIB_DESCRIPTION="Ubuntu 17.10" Name: Xfwm4 Class: xfwm4 PID: 1719 Window manager's "showing the desktop" mode: N/A This is xfwm4 version 4.12.4 (revision 78449522) for Xfce 4.12 Released under the terms of the GNU General Public License. Compiled against GTK+-2.24.31, using GTK+-2.24.31.
Build configuration and supported features:
- Startup notification support: Yes
- XSync support: Yes
- Render support: Yes
- Xrandr support: Yes
- Embedded compositor: Yes
- KDE systray proxy (deprecated): No
1080 1920 --- Starting mousepad and waiting for the window to be shown --- Initial setup is top left of the left monitor, size smaller than the monitor and not maximized Untitled 1 - Mousepad Window 37748739 Position: 2,73 (screen: 0) Geometry: 300x300 --- Resize so it fully covers left and middle monitors Untitled 1 - Mousepad Window 37748739 Position: 2,73 (screen: 0) Geometry: 300x300 Window 37748739 Position: 1082,73 (screen: 0) Geometry: 2160x300 --- Move again to 0 0 Untitled 1 - Mousepad Window 37748739 Position: 1082,73 (screen: 0) Geometry: 2160x300 Window 37748739 Position: 2,73 (screen: 0) Geometry: 2160x300 --- Restore the initial setup Untitled 1 - Mousepad
The issue is that after resizing the window, the location changes from 2x73 (top left of the left monitor) to 1082x73 (top left of the middle monitor). Note that the location can be "restored" by moving the window after it's resized.
A few more observations:
- It does not happen with this width calculation:
let width=2*$(xdotool getdisplaygeometry|awk '{print $1}')-3
- It happens with these width calculations:
let width=2*$(xdotool getdisplaygeometry|awk '{print $1}')+3 let width=2*$(xdotool getdisplaygeometry|awk '{print $1}')+300
- It happens when the window is originally on the first monitor (gets moved to the second) and also when it's on the second monitor (gets moved to the third). When the window is originally on the third monitor, it stays there.
Is anyone else experiencing similar issues or can anyone reproduce it with the above script?
If this is indeed an issue and not a feature of some sorts, let me know if you need more information to troubleshoot.
Version: 4.12.0