linux: another attempt to fix the segfault

Related: #202

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-02-07 14:38:18 +08:00
parent 91239fca90
commit e7e6426dca
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@
// This one is not included in any public headers. // This one is not included in any public headers.
using Display = struct _XDisplay; using Display = struct _XDisplay;
#if 0 // Causes segfault
#ifndef FRAMELESSHELPER_HAS_XLIB #ifndef FRAMELESSHELPER_HAS_XLIB
extern "C" extern "C"
{ {
@ -67,6 +68,7 @@ XInitThreads(
} // extern "C" } // extern "C"
#endif // FRAMELESSHELPER_HAS_XLIB #endif // FRAMELESSHELPER_HAS_XLIB
#endif
#if __has_include(<xcb/xcb.h>) #if __has_include(<xcb/xcb.h>)
# include <xcb/xcb.h> # include <xcb/xcb.h>

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////// //////////////////////////////////////////////
// Xlib // Xlib
#if 0 // Causes segfault
#ifndef FRAMELESSHELPER_HAS_XLIB #ifndef FRAMELESSHELPER_HAS_XLIB
FRAMELESSHELPER_STRING_CONSTANT(libX11) FRAMELESSHELPER_STRING_CONSTANT(libX11)
@ -46,6 +47,7 @@ XInitThreads(
} }
#endif // FRAMELESSHELPER_HAS_XLIB #endif // FRAMELESSHELPER_HAS_XLIB
#endif
////////////////////////////////////////////// //////////////////////////////////////////////
// XCB // XCB