mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Remove ifdef(Q_OS_X11) code, there never was such a define.
As noone complained since I don't think anyone will miss the code
This commit is contained in:
parent
e4b7ed8fd6
commit
4645e69147
1 changed files with 1 additions and 27 deletions
|
@ -42,9 +42,6 @@
|
|||
#include <QtDBus/QDBusInterface>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_X11)
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlComponent>
|
||||
|
@ -592,30 +589,7 @@ void ownCloudGui::raiseDialog(QWidget *raiseWidget)
|
|||
raiseWidget->showNormal();
|
||||
raiseWidget->raise();
|
||||
raiseWidget->activateWindow();
|
||||
|
||||
#if defined(Q_OS_X11)
|
||||
WId wid = widget->winId();
|
||||
NETWM::init();
|
||||
|
||||
XEvent e;
|
||||
e.xclient.type = ClientMessage;
|
||||
e.xclient.message_type = NETWM::NET_ACTIVE_WINDOW;
|
||||
e.xclient.display = QX11Info::display();
|
||||
e.xclient.window = wid;
|
||||
e.xclient.format = 32;
|
||||
e.xclient.data.l[0] = 2;
|
||||
e.xclient.data.l[1] = QX11Info::appTime();
|
||||
e.xclient.data.l[2] = 0;
|
||||
e.xclient.data.l[3] = 0l;
|
||||
e.xclient.data.l[4] = 0l;
|
||||
Display *display = QX11Info::display();
|
||||
XSendEvent(display,
|
||||
RootWindow(display, DefaultScreen(display)),
|
||||
False, // propagate
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&e);
|
||||
|
||||
#elif defined(Q_OS_WIN)
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows disallows raising a Window when you're not the active application.
|
||||
// Use a common hack to attach to the active application
|
||||
const auto activeProcessId = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
|
||||
|
|
Loading…
Reference in a new issue