Remove ifdef(Q_OS_X11) code, there never was such a define.
authorHannah von Reth <hannah.vonreth@owncloud.com>
Thu, 25 Jun 2020 14:25:11 +0000 (16:25 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:14 +0000 (10:59 +0100)
As noone complained since I don't think anyone will miss the code

src/gui/owncloudgui.cpp

index c70c57bd7ffb1af790f74eca991c72223ed59ad2..78c4efcab4460f62345a1551a9f765ab09e8ec96 100644 (file)
@@ -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);