From 4645e69147e1a88eb2f975643f3320d4e3ef34c7 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Thu, 25 Jun 2020 16:25:11 +0200 Subject: [PATCH] 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 --- src/gui/owncloudgui.cpp | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index c70c57bd7..78c4efcab 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -42,9 +42,6 @@ #include #endif -#if defined(Q_OS_X11) -#include -#endif #include #include @@ -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);