kiran-cc-daemon/0001-feature-backends-Compatible-wayland-framework-which-.patch
tangjie02 f0f17c3de9 Compatible wayland framework which exists xwayland.
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
2023-02-07 20:17:26 +08:00

32 lines
974 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 52df180fc5d96e5b5923667d57be0e971ddc2e9f Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Tue, 7 Feb 2023 20:07:29 +0800
Subject: [PATCH] feature(backends): Compatible wayland framework which exists
xwayland.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在wayland环境下gtk获取的display默认为wayland display会导致程序崩溃因此需要强制指定gtk使用x11作为backend。
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
src/main.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main.cpp b/src/main.cpp
index 0ed4cc9..d065d25 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -83,6 +83,7 @@ int main(int argc, char* argv[])
#if defined KCC_SYSTEM_TYPE
auto loop = Glib::MainLoop::create();
#elif defined KCC_SESSION_TYPE
+ gdk_set_allowed_backends("x11");
gtk_init(NULL, NULL);
Gdk::wrap_init();
Gtk::wrap_init();
--
2.36.1