From 8c3c466abf8dca39d11b0e02f29998909e407f7d Mon Sep 17 00:00:00 2001 From: lxz Date: Mon, 28 Sep 2020 16:03:06 +0800 Subject: [PATCH] fix: Window exception Some dtk windows may be started before the window manager, and the rounded corners of the window cannot be set correctly, and need to use environment variables to force the setting. Bug: https://pms.uniontech.com/zentao/bug-view-49685.html Log: Window exception Change-Id: I49be7a67a2cd1467a4fa0dd1c0bfbac392793a91 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/6550 Reviewed-by: Reviewed-by: fanpengcheng Tested-by: --- frame/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frame/main.cpp b/frame/main.cpp index 5a458f949..e101fff4e 100644 --- a/frame/main.cpp +++ b/frame/main.cpp @@ -187,6 +187,11 @@ void sig_crash(int sig) int main(int argc, char *argv[]) { + if (QString(getenv("XDG_CURRENT_DESKTOP")).compare("deepin", Qt::CaseInsensitive) == 0) { + qDebug() << "Warning: force enable D_DXCB_FORCE_NO_TITLEBAR now!"; + setenv("D_DXCB_FORCE_NO_TITLEBAR", "1", 1); + } + DGuiApplicationHelper::setUseInactiveColorGroup(false); DockApplication app(argc, argv);