Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getwindowgeometry reports incorrect coordinates #176

Open
michaelgilch opened this issue Jul 19, 2017 · 3 comments
Open

getwindowgeometry reports incorrect coordinates #176

michaelgilch opened this issue Jul 19, 2017 · 3 comments

Comments

@michaelgilch
Copy link

michaelgilch commented Jul 19, 2017

If i use:
xdotool windowmove 0 26
the window is properly moved to the far left of my screen and butted up against my 25px panel. However, if I then run
xdotool getwindowgeometry
it reports Position: 0,72

If I use windowmove to y 72, it is definitely not in the same position.

@michaelgilch
Copy link
Author

Upon further examination, and experimenting with my window decorator size and panel size, I have found the following:
Panel = 25
Window Decorator = 23
Yields:
Absolute Y Position = 49 (Panel + Window Decorator)
Relative Y Position = 23 (Offset into Workable Desktop Space)
Position 72 = Absolute Y + Relative Y (INCORRECT)
Should be
Position 26 = Absolute Y - Relative Y

@guzzard
Copy link

guzzard commented Oct 31, 2017

Also have this issue.

For example placing a terminal window (GTK2) at 0,0 and then running "xdotool getactivewindow getwindowgeometry --shell" gives the following results:

WINDOW=73400323
X=12
Y=55
WIDTH=1442
HEIGHT=980
SCREEN=0

X, Y and HEIGHT are incorrect. Height is not including the titlebar of of the window.

With a GTK3 window at 0,0 I get the following results:

WINDOW=90177784
X=-12
Y=-11
WIDTH=1547
HEIGHT=1423
SCREEN=0

X, Y, WIDTH and HEIGHT are incorrect. Both width and height are bigger than the actual window.

@UndeadDevel
Copy link

Can confirm that this is still an issue; windowmove should behave consistently with the coordinates obtained by getwindowgeometry, but the latter ignores the titlebar and window border, while the former does not. Looks like a fix has been prepared in this fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants