From 648b23b548eee61b05c9f2d0b8fac2bff28468a6 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 24 Jun 2024 13:59:06 +0400 Subject: [PATCH] Do non-getting XCB requests synchronously --- .../platform/linux/main_window_linux.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index e4507c795..1eb4f59d0 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -89,13 +89,16 @@ void XCBSkipTaskbar(QWindow *window, bool skip) { xev.data.data32[3] = 0; xev.data.data32[4] = 0; - xcb_send_event( - connection, - false, - root, - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT - | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, - reinterpret_cast(&xev)); + free( + xcb_request_check( + connection, + xcb_send_event_checked( + connection, + false, + root, + XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT + | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, + reinterpret_cast(&xev)))); } #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION