[Konsole-devel] Programmatically Moving a konsole window doesn't work correctly
Adam Batkin
adam at batkin.net
Sun Jan 10 04:01:55 UTC 2016
Here's a weird one that I'm wondering if anyone else can reproduce or
shed some light on: Programatically moving a konsole window (using
xdotool or wmctrl) move the window to the wrong place.
My DE is actually XFCE, but I'm using Konsole. All other apps that I
have tried (including a bunch of other KDE apps like konqueror) seem to
work fine.
Specifically, if I run xwininfo, I would expect that the proper
coordinates of the window to be:
x = Absolute upper-left X - Relative upper-left X
y = Absolute upper-left Y - Relative upper-left Y
So for example, if I have a window with these settings as reported by
xwininfo:
Absolute upper-left X: 800
Absolute upper-left Y: 327
Relative upper-left X: 3
Relative upper-left Y: 22
Then my realX = 800 - 3 = 797
And my realY = 327 - 22 = 305
So if I run "xdotool windowmove 0xWHATEVER 797 305" or "wmctrl -i -r
0xWHATEVER -e 0,797,305,-1,-1" then I would expect the window to remain
in the same place. And this works correctly for every application EXCEPT
konsole. Konsole will remain if I instead use the Absolute coordinates
(in my example 800,327). Since every application reports a non-zero pair
of relative coordinates (I assume they account for the width of the
border/titlebar) I'm assuming that my math is correct.
Very weird. Ideas?
-Adam Batkin
More information about the konsole-devel
mailing list