Commit c534fdf1 authored by David Faure's avatar David Faure

Harmonize usage of HAVE_X11, using #if and #cmakedefine01 everywhere

I got "#define HAVE_X11 TRUE" and errors because of that where #if was
used.

This also obeys the logic that HAVE_X11 is set (in the toplevel
CMakeLists.txt) not only when X11_FOUND but also when XCB is found.
parent 04fc21a2
......@@ -106,7 +106,7 @@ AppMenuModule::~AppMenuModule() = default;
void AppMenuModule::slotWindowRegistered(WId id, const QString &serviceName, const QDBusObjectPath &menuObjectPath)
{
#ifdef HAVE_X11
#if HAVE_X11
if (KWindowSystem::isPlatformX11()) {
auto *c = QX11Info::connection();
......
......@@ -41,4 +41,4 @@
#cmakedefine HAS_RANDR_1_3 1
/* Define if you have X11 at all */
#define HAVE_X11 ${X11_FOUND}
#cmakedefine01 HAVE_X11
/* Define if you have X11 at all */
#define HAVE_X11 ${X11_FOUND}
#cmakedefine01 HAVE_X11
/* Define if you have X11 at all */
#define HAVE_X11 ${X11_FOUND}
#cmakedefine01 HAVE_X11
......@@ -37,7 +37,7 @@
#include <windows.h>
#endif
#ifdef HAVE_X11
#if HAVE_X11
#include <X11/Xlib.h>
#include <fixx11h.h>
#endif
......
......@@ -219,7 +219,7 @@ void SolidUiServer::reparentDialog(QWidget *dialog, WId wId, const QString &appI
KWindowSystem::setMainWindow(dialog, wId); // correct, set dialog parent
#ifdef HAVE_X11
#if HAVE_X11
if (modal) {
KWindowSystem::setState(dialog->winId(), NET::Modal);
} else {
......
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