Skip to content

Commit 674b7cb

Browse files
committed
(#17) Removed border offset for x and y coordinates of window rect on Linux
XGetGeometry returns the outer point of a window and does not require an offset calculation
1 parent 2ec2fbe commit 674b7cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/linux/window_manager.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ MMRect getWindowRect(const WindowHandle windowHandle) {
7171
uint32_t width, height, border_width, border_height;
7272
Status getXGeometryResult = XGetGeometry(xServer, windowHandle, &rootWindow, &x, &y, &width, &height, &border_width, &border_height);
7373
if (getXGeometryResult > 0) {
74-
windowRect = MMRectMake(x - border_width, y - border_height, width + border_width, height + border_height);
74+
windowRect = MMRectMake(x, y, width + border_width, height + border_height);
7575
}
7676
disconnectFromX(xServer);
7777
}

0 commit comments

Comments
 (0)