From 3b909eab0386560e350459763b3910ce30cd4a6e Mon Sep 17 00:00:00 2001 From: "Alexander Cusaac (MightyChubz)" Date: Mon, 11 May 2026 20:52:52 -0400 Subject: [PATCH 1/2] fix: Add missing parameter to TranslateCoordinates This adds the missing child_return parameter to TranslateCoordinates to fix random segfaults occurring when calling it. This function in the man pages for X11 list a child_return parameter, so I added it as part of the signature. After running 20 tests calling to this function, all passed without failing, compared to before where it crashed roughly ~60% of the time on my system. --- vendor/x11/xlib/xlib_procs.odin | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/x11/xlib/xlib_procs.odin b/vendor/x11/xlib/xlib_procs.odin index 3ab4acd17..0c03f883f 100644 --- a/vendor/x11/xlib/xlib_procs.odin +++ b/vendor/x11/xlib/xlib_procs.odin @@ -295,6 +295,7 @@ foreign xlib { src_y: i32, dst_x: ^i32, dst_y: ^i32, + dst_child: ^Window, ) -> b32 --- QueryPointer :: proc( display: ^Display, From 202a4f19caea073a15ab75e0aa58cf2dca560c2b Mon Sep 17 00:00:00 2001 From: "Alexander Cusaac (MightyChubz)" Date: Mon, 11 May 2026 20:55:33 -0400 Subject: [PATCH 2/2] refactor: Change return type for IconifyWindow This one is a little tricky. While the docs show that XIconifyWIndow returns a Status type, hinting at the Status enum we have, it is not *treated* like a Status type. This function, so far in my experience, is the only one to return non-zero when successful, and zero when a failure occurrs (BadValue or BadWindow). Because of this, the type should actually be a b32 to act as a boolean. Zero (false) for failure, non-zero (true) for true. --- vendor/x11/xlib/xlib_procs.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/x11/xlib/xlib_procs.odin b/vendor/x11/xlib/xlib_procs.odin index 0c03f883f..528bcaa72 100644 --- a/vendor/x11/xlib/xlib_procs.odin +++ b/vendor/x11/xlib/xlib_procs.odin @@ -1302,7 +1302,7 @@ foreign xlib { dipslay: ^Display, window: Window, screen_no: i32, - ) -> Status --- + ) -> b32 --- WithdrawWindow :: proc( dipslay: ^Display, window: Window,