Merge pull request #1372 from emersion/config10

Use #if instead of #ifdef for wlroots config data
This commit is contained in:
Drew DeVault 2018-11-12 16:14:18 -05:00 committed by GitHub
commit 77dfac4fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 69 additions and 61 deletions

View file

@ -64,7 +64,7 @@ struct wlr_x11_backend {
// A blank cursor
xcb_cursor_t cursor;
#ifdef WLR_HAS_XCB_XKB
#if WLR_HAS_XCB_XKB
bool xkb_supported;
uint8_t xkb_base_event;
uint8_t xkb_base_error;

View file

@ -76,7 +76,7 @@ struct roots_desktop {
struct wl_listener virtual_keyboard_new;
struct wl_listener pointer_constraint;
#ifdef WLR_HAS_XWAYLAND
#if WLR_HAS_XWAYLAND
struct wlr_xwayland *xwayland;
struct wl_listener xwayland_surface;
#endif

View file

@ -7,7 +7,7 @@
#include <wlr/config.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_data_device.h>
#ifdef WLR_HAS_XWAYLAND
#if WLR_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "rootston/config.h"

View file

@ -79,7 +79,7 @@ enum roots_view_type {
ROOTS_WL_SHELL_VIEW,
ROOTS_XDG_SHELL_V6_VIEW,
ROOTS_XDG_SHELL_VIEW,
#ifdef WLR_HAS_XWAYLAND
#if WLR_HAS_XWAYLAND
ROOTS_XWAYLAND_VIEW,
#endif
};
@ -117,7 +117,7 @@ struct roots_view {
struct wlr_wl_shell_surface *wl_shell_surface;
struct wlr_xdg_surface_v6 *xdg_surface_v6;
struct wlr_xdg_surface *xdg_surface;
#ifdef WLR_HAS_XWAYLAND
#if WLR_HAS_XWAYLAND
struct wlr_xwayland_surface *xwayland_surface;
#endif
};
@ -125,7 +125,7 @@ struct roots_view {
struct roots_wl_shell_surface *roots_wl_shell_surface;
struct roots_xdg_surface_v6 *roots_xdg_surface_v6;
struct roots_xdg_surface *roots_xdg_surface;
#ifdef WLR_HAS_XWAYLAND
#if WLR_HAS_XWAYLAND
struct roots_xwayland_surface *roots_xwayland_surface;
#endif
};

View file

@ -9,7 +9,7 @@ install_headers(
subdir: 'wlr/backend',
)
if conf_data.get('WLR_HAS_X11_BACKEND', false)
if conf_data.get('WLR_HAS_X11_BACKEND', 0) == 1
install_headers('x11.h', subdir: 'wlr/backend')
endif

View file

@ -15,7 +15,7 @@ install_headers(
'xcursor.h',
subdir: 'wlr'
)
if conf_data.get('WLR_HAS_XWAYLAND', false)
if conf_data.get('WLR_HAS_XWAYLAND', 0) == 1
install_headers('xwayland.h', subdir: 'wlr')
endif

View file

@ -11,7 +11,7 @@
#include <wlr/config.h>
#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
#define MESA_EGL_NO_X11_HEADERS
#endif

View file

@ -11,7 +11,7 @@
#include <wlr/config.h>
#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
#define MESA_EGL_NO_X11_HEADERS
#endif

View file

@ -5,10 +5,10 @@
#include <wlr/config.h>
#include <wlr/xwayland.h>
#include <xcb/render.h>
#ifdef WLR_HAS_XCB_ICCCM
#if WLR_HAS_XCB_ICCCM
#include <xcb/xcb_icccm.h>
#endif
#ifdef WLR_HAS_XCB_ERRORS
#if WLR_HAS_XCB_ERRORS
#include <xcb/xcb_errors.h>
#endif
#include "xwayland/selection.h"
@ -122,7 +122,7 @@ struct wlr_xwm {
struct wlr_xwayland_surface *drag_focus;
const xcb_query_extension_reply_t *xfixes;
#ifdef WLR_HAS_XCB_ERRORS
#if WLR_HAS_XCB_ERRORS
xcb_errors_context_t *errors_context;
#endif