Commit 89596be8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Reactivate X11 code

parent 6e6e54a2
......@@ -161,6 +161,10 @@ Phonon::phonon4qt5
KF5::Auth
)
if (Qt5X11Extras_FOUND)
target_link_libraries(kalarm_bin Qt5::X11Extras)
endif()
install(TARGETS kalarm_bin ${INSTALL_TARGETS_DEFAULT_ARGS})
#endif (UNIX)
......
......@@ -25,6 +25,7 @@
#include "eventlistview.h"
#include "messagebox.h"
#include "preferences.h"
#include "config-kdepim.h"
#include <kalarmcal/kaevent.h>
......@@ -115,7 +116,7 @@ void Find::display()
if (mDialog)
{
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
KWindowSystem::activateWindow(mDialog->winId());
#endif
}
......
......@@ -18,6 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//QT5 reactivate after #include "config-kdepim.h"
#include "kalarm.h" //krazy:exclude=includes (kalarm.h must be first)
#include "functions.h"
#include "functions_p.h"
......@@ -69,7 +70,7 @@ using namespace KCalCore;
#include <qdebug.h>
#include <ktoolinvocation.h>
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
#include <kwindowsystem.h>
#include <kxmessages.h>
#include <kstartupinfo.h>
......@@ -1408,7 +1409,7 @@ QString runKMail(bool minimise)
*/
bool Private::startKMailMinimised()
{
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
NETRootInfo i(QX11Info::display(), NET::Supported);
if (i.isSupported(NET::WM2KDETemporaryRules))
{
......@@ -1455,7 +1456,7 @@ bool Private::startKMailMinimised()
*/
void Private::windowAdded(WId w)
{
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
static const int SUPPORTED_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask
| NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask;
......
......@@ -19,7 +19,8 @@
*/
#include "desktop.h"
#ifdef Q_WS_X11
#include "config-kdepim.h"
#if KDEPIM_HAVE_X11
#include <kwindowsystem.h>
#endif
#include <QApplication>
......@@ -33,7 +34,7 @@ namespace KAlarm {
*/
QRect desktopWorkArea(int screen)
{
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
if (screen < 0)
return KWindowSystem::workArea();
#endif
......
......@@ -18,6 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//QT5 reactivate after porting #include "config-kdepim.h"
#include "kalarm.h"
#include "messagewin_p.h"
#include "messagewin.h"
......@@ -62,9 +63,9 @@
#include <phonon/volumefadereffect.h>
#include <qdebug.h>
#include <ktoolinvocation.h>
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
#include <netwm.h>
#include <QX11Info>
#include <qx11info_x11.h>
#endif
#include <KGlobal>
......@@ -94,7 +95,7 @@
using namespace KCalCore;
using namespace KAlarmCal;
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
enum FullScreenType { NoFullScreen = 0, FullScreen = 1, FullScreenActive = 2 };
static FullScreenType haveFullScreenWindow(int screen);
static FullScreenType findFullScreenWindows(const QVector<QRect>& screenRects, QVector<FullScreenType>& screenTypes);
......@@ -2276,7 +2277,7 @@ bool MessageWin::getWorkAreaAndModal()
{
mScreenNumber = -1;
const bool modal = Preferences::modalMessages();
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
const QDesktopWidget* desktop = qApp->desktop();
const int numScreens = desktop->numScreens();
if (numScreens > 1)
......@@ -2363,7 +2364,7 @@ qDebug()<<"full="<<full<<", screen="<<mScreenNumber;
return modal;
}
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
/******************************************************************************
* In a multi-screen setup (not a single virtual desktop), find whether the
* specified screen has a full screen window on it.
......
......@@ -70,7 +70,7 @@ using namespace KHolidays;
#include <kstandardguiitem.h>
#include <ksystemtimezone.h>
#include <kicon.h>
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
#include <kwindowinfo.h>
#include <kwindowsystem.h>
#endif
......@@ -131,7 +131,7 @@ void KAlarmPrefDlg::display()
}
else
{
#ifdef Q_WS_X11
#if KDEPIM_HAVE_X11
KWindowInfo info = KWindowSystem::windowInfo(mInstance->winId(), NET::WMGeometry | NET::WMDesktop);
KWindowSystem::setCurrentDesktop(info.desktop());
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment