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: <mailman@uniontech.com>
Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com>
Tested-by: <mailman@uniontech.com>
This commit is contained in:
lxz 2020-09-28 16:03:06 +08:00 committed by zhangdingyuan
parent 7043cc251b
commit 8c3c466abf

View File

@ -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);