Skip to content

Commit

Permalink
fix: open more display
Browse files Browse the repository at this point in the history
Get display by qt.
  • Loading branch information
18202781743 authored and deepin-bot[bot] committed Sep 5, 2024
1 parent 5ac3226 commit f1f7198
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frame/utility_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ static X11Utility *instance()

X11Utility::X11Utility()
{
m_display = XOpenDisplay("");
if (!m_display) {
qCWarning(dsLog) << "Failed to open XDisplay.";
}
if (auto x11Application = qGuiApp->nativeInterface<QNativeInterface::QX11Application>())
m_display = x11Application->display();
}

_XDisplay *X11Utility::getDisplay()
Expand Down

0 comments on commit f1f7198

Please sign in to comment.