About wmctrl
With wmctrl
(not installed by default), we can get information on windows, their id, their geometry, the pid they belong to etc. We can also move or resize windows with several commands. However, in some respects, its behaviour seems not logical. My question is about moving windows by wmctrl
:
Getting information
When I run the command:
wmctrl -lG
I get (a.o.) the following information about the window in the picture(s)below:
0x04200085 0 746 443 468 205 jacob-System-Product-Name Niet-opgeslagen document 1 - gedit
In column 3-5, the geometry information tells us the x/y coordinates and the width/height.
Moving/resizing the window
When I put these coordinates in the wmctrl
command to move/resize a window, it should do nothing, since the coordinates are unchanged:
wmctrl -ir 0x04200085 -e 0,746,443,468,205
Deviation
However, the pictures below show the window is moved downwards (28px to be precise). I assumed the reason was that the wmctrl
window move command calculated with the working area (screen minus panel height), while the wmctrl -lG
command calculated with the total screen size. Then still 4px is unexplained however (the panel is 24px high).
Although the deviation can very well be compensated in scripts, the fact that I don't understand the cause is not satisfying, so the question is:
What is exactly the cause for this deviation?
Moving a window with the exact coordinates in the output of wmctrl -lG
should not move the window, but it does