refactor: Move src/lib/Config => src/lib/platform/XWindowsConfig
This file is used only in XWindows related platform code.
This commit is contained in:
parent
163ec18730
commit
7682e17afe
8 changed files with 14 additions and 27 deletions
|
|
@ -164,13 +164,7 @@ macro(configure_unix_libs)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Unix only: For config.h, save the results based on a template (config.h.in).
|
add_definitions(-DSYSAPI_UNIX=1)
|
||||||
# Note that this won't work on Windows because filenames are not case sensitive,
|
|
||||||
# and we have header files named "Config.h" (upper case 'C').
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/src/lib/Config.h.in
|
|
||||||
${CMAKE_BINARY_DIR}/src/lib/Config.h @ONLY)
|
|
||||||
|
|
||||||
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@
|
||||||
#include "gui/widgets/LogDock.h"
|
#include "gui/widgets/LogDock.h"
|
||||||
#include "net/FingerprintDatabase.h"
|
#include "net/FingerprintDatabase.h"
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
|
||||||
#include "Config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ elseif(UNIX)
|
||||||
XDGKeyUtil.cpp
|
XDGKeyUtil.cpp
|
||||||
)
|
)
|
||||||
if (BUILD_X11_SUPPORT)
|
if (BUILD_X11_SUPPORT)
|
||||||
|
configure_file(XWindowsConfig.h.in XWindowsConfig.h @ONLY)
|
||||||
list(APPEND PLATFORM_SOURCES
|
list(APPEND PLATFORM_SOURCES
|
||||||
XWindowsClipboard.cpp
|
XWindowsClipboard.cpp
|
||||||
XWindowsClipboard.h
|
XWindowsClipboard.h
|
||||||
|
|
@ -126,6 +127,7 @@ elseif(UNIX)
|
||||||
XWindowsScreenSaver.h
|
XWindowsScreenSaver.h
|
||||||
XWindowsUtil.cpp
|
XWindowsUtil.cpp
|
||||||
XWindowsUtil.h
|
XWindowsUtil.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/XWindowsConfig.h
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,24 +5,22 @@
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// clang-format off
|
#pragma once
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
#define HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_DPMS_H @HAVE_X11_EXTENSIONS_DPMS_H@
|
#define HAVE_X11_EXTENSIONS_DPMS_H @HAVE_X11_EXTENSIONS_DPMS_H@
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XINERAMA_H @HAVE_X11_EXTENSIONS_XINERAMA_H@
|
#define HAVE_X11_EXTENSIONS_XINERAMA_H @HAVE_X11_EXTENSIONS_XINERAMA_H@
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XTEST_H @HAVE_X11_EXTENSIONS_XTEST_H@
|
#define HAVE_X11_EXTENSIONS_XTEST_H @HAVE_X11_EXTENSIONS_XTEST_H@
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/XInput2.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/XInput2.h> header file. */
|
||||||
#cmakedefine HAVE_XI2 @HAVE_XI2@
|
#define HAVE_XI2 @HAVE_XI2@
|
||||||
|
|
||||||
/* Define this if the XKB extension is available. */
|
/* Define this if the XKB extension is available. */
|
||||||
#cmakedefine HAVE_XKB_EXTENSION @HAVE_XKB_EXTENSION@
|
#define HAVE_XKB_EXTENSION @HAVE_XKB_EXTENSION@
|
||||||
|
|
||||||
// clang-format on
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
#include "deskflow/KeyState.h"
|
#include "deskflow/KeyState.h"
|
||||||
|
#include "platform/XWindowsConfig.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,12 @@
|
||||||
#include "deskflow/ScreenException.h"
|
#include "deskflow/ScreenException.h"
|
||||||
#include "platform/XDGKeyUtil.h"
|
#include "platform/XDGKeyUtil.h"
|
||||||
#include "platform/XWindowsClipboard.h"
|
#include "platform/XWindowsClipboard.h"
|
||||||
|
#include "platform/XWindowsConfig.h"
|
||||||
#include "platform/XWindowsEventQueueBuffer.h"
|
#include "platform/XWindowsEventQueueBuffer.h"
|
||||||
#include "platform/XWindowsKeyState.h"
|
#include "platform/XWindowsKeyState.h"
|
||||||
#include "platform/XWindowsScreenSaver.h"
|
#include "platform/XWindowsScreenSaver.h"
|
||||||
#include "platform/XWindowsUtil.h"
|
#include "platform/XWindowsUtil.h"
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
#include "deskflow/KeyMap.h"
|
#include "deskflow/KeyMap.h"
|
||||||
#include "deskflow/PlatformScreen.h"
|
#include "deskflow/PlatformScreen.h"
|
||||||
#include "platform/XDGPowerManager.h"
|
#include "platform/XDGPowerManager.h"
|
||||||
|
#include "platform/XWindowsConfig.h"
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,9 @@
|
||||||
|
|
||||||
#include "base/Event.h"
|
#include "base/Event.h"
|
||||||
#include "base/IEventQueue.h"
|
#include "base/IEventQueue.h"
|
||||||
|
#include "platform/XWindowsConfig.h"
|
||||||
#include "platform/XWindowsUtil.h"
|
#include "platform/XWindowsUtil.h"
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
#if HAVE_X11_EXTENSIONS_XTEST_H
|
||||||
#include <X11/extensions/XTest.h>
|
#include <X11/extensions/XTest.h>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue