mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 16:02:46 +08:00
Merge pull request #981 from whot/wip/simplify-ifdefs
Remove some #defines that had no useful effect
This commit is contained in:
@@ -3,39 +3,31 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/X.h>
|
||||
# include <X11/Xutil.h>
|
||||
# define XK_MISCELLANY
|
||||
# define XK_XKB_KEYS
|
||||
# include <X11/keysymdef.h>
|
||||
# if HAVE_X11_EXTENSIONS_DPMS_H
|
||||
extern "C" {
|
||||
# include <X11/extensions/dpms.h>
|
||||
}
|
||||
# endif
|
||||
# if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
# else
|
||||
# error The XTest extension is required to build barrier
|
||||
# endif
|
||||
# if HAVE_X11_EXTENSIONS_XINERAMA_H
|
||||
// Xinerama.h may lack extern "C" for inclusion by C++
|
||||
extern "C" {
|
||||
# include <X11/extensions/Xinerama.h>
|
||||
}
|
||||
# endif
|
||||
# if HAVE_X11_EXTENSIONS_XRANDR_H
|
||||
# include <X11/extensions/Xrandr.h>
|
||||
# endif
|
||||
# if HAVE_XKB_EXTENSION
|
||||
# include <X11/XKBlib.h>
|
||||
# endif
|
||||
# ifdef HAVE_XI2
|
||||
# include <X11/extensions/XInput2.h>
|
||||
# endif
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xutil.h>
|
||||
#define XK_MISCELLANY
|
||||
#define XK_XKB_KEYS
|
||||
#include <X11/keysymdef.h>
|
||||
#if HAVE_X11_EXTENSIONS_DPMS_H
|
||||
extern "C" {
|
||||
# include <X11/extensions/dpms.h>
|
||||
}
|
||||
#endif
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_X11_EXTENSIONS_XINERAMA_H
|
||||
// Xinerama.h may lack extern "C" for inclusion by C++
|
||||
extern "C" {
|
||||
# include <X11/extensions/Xinerama.h>
|
||||
}
|
||||
#endif
|
||||
#if HAVE_X11_EXTENSIONS_XRANDR_H
|
||||
# include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
#if HAVE_XKB_EXTENSION
|
||||
# include <X11/XKBlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_XI2
|
||||
# include <X11/extensions/XInput2.h>
|
||||
#endif
|
||||
|
||||
class IXWindowsImpl {
|
||||
|
||||
@@ -25,11 +25,7 @@
|
||||
#include "common/stdvector.h"
|
||||
#include "XWindowsImpl.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class IXWindowsClipboardConverter;
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
#include "common/stdvector.h"
|
||||
#include "XWindowsImpl.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class IEventQueue;
|
||||
|
||||
|
||||
@@ -24,18 +24,14 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/X.h>
|
||||
# include <X11/Xutil.h>
|
||||
# define XK_MISCELLANY
|
||||
# define XK_XKB_KEYS
|
||||
# include <X11/keysymdef.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xutil.h>
|
||||
#define XK_MISCELLANY
|
||||
#define XK_XKB_KEYS
|
||||
#include <X11/keysymdef.h>
|
||||
#if HAVE_XKB_EXTENSION
|
||||
# include <X11/XKBlib.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const size_t ModifiersFromXDefaultSize = 32;
|
||||
|
||||
|
||||
@@ -23,18 +23,10 @@
|
||||
#include "common/stdvector.h"
|
||||
#include "XWindowsImpl.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
# if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
# else
|
||||
# error The XTest extension is required to build barrier
|
||||
# endif
|
||||
# if HAVE_XKB_EXTENSION
|
||||
# include <X11/extensions/XKBstr.h>
|
||||
# endif
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_XKB_EXTENSION
|
||||
# include <X11/extensions/XKBstr.h>
|
||||
#endif
|
||||
|
||||
class IEventQueue;
|
||||
|
||||
@@ -24,11 +24,7 @@
|
||||
#include "common/stdvector.h"
|
||||
#include "XWindowsImpl.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class XWindowsClipboard;
|
||||
class XWindowsKeyState;
|
||||
|
||||
@@ -26,31 +26,11 @@
|
||||
#include "base/TMethodEventJob.h"
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#if HAVE_X11_EXTENSIONS_XTEST_H
|
||||
# include <X11/extensions/XTest.h>
|
||||
#else
|
||||
# error The XTest extension is required to build barrier
|
||||
#endif
|
||||
#include <X11/extensions/XTest.h>
|
||||
#if HAVE_X11_EXTENSIONS_DPMS_H
|
||||
extern "C" {
|
||||
# include <X11/Xmd.h>
|
||||
# include <X11/extensions/dpms.h>
|
||||
# if !HAVE_DPMS_PROTOTYPES
|
||||
# undef DPMSModeOn
|
||||
# undef DPMSModeStandby
|
||||
# undef DPMSModeSuspend
|
||||
# undef DPMSModeOff
|
||||
# define DPMSModeOn 0
|
||||
# define DPMSModeStandby 1
|
||||
# define DPMSModeSuspend 2
|
||||
# define DPMSModeOff 3
|
||||
extern Bool DPMSQueryExtension(Display *, int *, int *);
|
||||
extern Bool DPMSCapable(Display *);
|
||||
extern Status DPMSEnable(Display *);
|
||||
extern Status DPMSDisable(Display *);
|
||||
extern Status DPMSForceLevel(Display *, CARD16);
|
||||
extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
#include "common/stdmap.h"
|
||||
#include "XWindowsImpl.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class Event;
|
||||
class EventQueueTimer;
|
||||
|
||||
@@ -22,11 +22,7 @@
|
||||
#include "common/stdmap.h"
|
||||
#include "common/stdvector.h"
|
||||
|
||||
#if X_DISPLAY_MISSING
|
||||
# error X11 is required to build barrier
|
||||
#else
|
||||
# include <X11/Xlib.h>
|
||||
#endif
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user