Skip to content

Commit

Permalink
Use XOpenDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
CoBC committed Dec 5, 2024
1 parent f91ac63 commit aacf322
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Client/qtTeamTalk/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3699,10 +3699,7 @@ void MainWindow::enableHotKey(HotKeyID id, const hotkey_t& hk)

#elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(6,0,0)

Display* display = static_cast<Display*>(
QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("display")
);

Display* display = XOpenDisplay(nullptr);
Window x11window = RootWindow(display, DefaultScreen(display));
keycomp_t keycomp;
quint32 mods = 0, keycode = 0;
Expand Down Expand Up @@ -3783,10 +3780,7 @@ void MainWindow::disableHotKey(HotKeyID id)

#elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(6,0,0)

Display* display = static_cast<Display*>(
QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("display")
);

Display* display = XOpenDisplay(nullptr);
Window x11window = RootWindow(display, DefaultScreen(display));
reghotkeys_t::iterator hk_ite = m_hotkeys.find(id);
if(hk_ite != m_hotkeys.end())
Expand Down

0 comments on commit aacf322

Please sign in to comment.