mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
parent
b6dc436e03
commit
8e856c3dd6
1
run.sh
1
run.sh
@ -19,5 +19,4 @@ else
|
||||
fi
|
||||
cmake --build . --target fastfetch ${cmake_build_args}
|
||||
|
||||
export LSAN_OPTIONS=suppressions=../tests/lsan.supp
|
||||
./fastfetch "$@"
|
||||
|
@ -17,6 +17,7 @@ typedef struct WaylandData
|
||||
FFlist* results;
|
||||
FF_LIBRARY_SYMBOL(wl_proxy_marshal_constructor_versioned)
|
||||
FF_LIBRARY_SYMBOL(wl_proxy_add_listener)
|
||||
FF_LIBRARY_SYMBOL(wl_proxy_destroy)
|
||||
const struct wl_interface* ffwl_output_interface;
|
||||
} WaylandData;
|
||||
|
||||
@ -50,10 +51,10 @@ static void stubListener(void* data, ...)
|
||||
|
||||
static void waylandOutputModeListener(void* data, struct wl_output* output, uint32_t flags, int32_t width, int32_t height, int32_t refreshRate)
|
||||
{
|
||||
FF_UNUSED(output);
|
||||
|
||||
WaylandData* wldata = data;
|
||||
|
||||
wldata->ffwl_proxy_destroy((struct wl_proxy*) output);
|
||||
|
||||
if(!(flags & WL_OUTPUT_MODE_CURRENT) || width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
@ -117,6 +118,7 @@ bool detectWayland(const FFinstance* instance, FFDisplayServerResult* result)
|
||||
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR(wayland, data, wl_proxy_marshal_constructor_versioned, false)
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR(wayland, data, wl_proxy_add_listener, false)
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR(wayland, data, wl_proxy_destroy, false)
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR(wayland, data, wl_output_interface, false)
|
||||
|
||||
struct wl_display* display = ffwl_display_connect(NULL);
|
||||
@ -147,7 +149,8 @@ bool detectWayland(const FFinstance* instance, FFDisplayServerResult* result)
|
||||
ffwl_display_dispatch(display);
|
||||
ffwl_display_roundtrip(display);
|
||||
|
||||
ffwl_display_disconnect(display); //This will also destroy our wl_registry and wl_output proxies
|
||||
data.ffwl_proxy_destroy(registry);
|
||||
ffwl_display_disconnect(display);
|
||||
dlclose(wayland);
|
||||
|
||||
//We successfully connected to wayland and detected the resolution.
|
||||
|
@ -1 +0,0 @@
|
||||
leak:*libwayland-client.so*
|
Loading…
x
Reference in New Issue
Block a user