Skip to content

Commit

Permalink
fix: rmove kwayland-shell
Browse files Browse the repository at this point in the history
rmove kwayland-shell

Log: remove kwayland-shell
  • Loading branch information
lzwind authored and deepin-bot[bot] committed Nov 7, 2024
1 parent 7301c49 commit 0728424
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
deepin-ocr (1.5.1) unstable; urgency=medium

*remove env kwayland-shell

-- Liu zheng <[email protected]> Wed, 06 Nov 2024 15:33:24 +0800

deepin-ocr (1.5.0) unstable; urgency=medium

* adapt treeland
Expand Down
24 changes: 0 additions & 24 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,13 @@

DWIDGET_USE_NAMESPACE

bool isTreeland()
{
return qEnvironmentVariable("DDE_CURRENT_COMPOSITOR") == QStringLiteral("TreeLand");
}

//判断是否是wayland
bool CheckWayland()
{
auto e = QProcessEnvironment::systemEnvironment();
QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE"));
QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY"));

if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
return true;
else {
return false;
}
}

int main(int argc, char *argv[])
{

if (argc < 2) {
qDebug() << "Cant open a null file";
return 0;
}
//判断是否是wayland
if (CheckWayland() && !isTreeland()) {
//默认走xdgv6,该库没有维护了,因此需要添加该代码
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "kwayland-shell");
}

DGuiApplicationHelper::setUseInactiveColorGroup(false);
#if(DTK_VERSION < DTK_VERSION_CHECK(5,4,0,0))
Expand Down

0 comments on commit 0728424

Please sign in to comment.