Use #if instead of #ifdef for WLR_HAS_*
This commit is contained in:
parent
3b8d4a9212
commit
2afd930914
|
@ -1,12 +1,7 @@
|
||||||
#ifndef _SWAY_STRINGOP_H
|
#ifndef _SWAY_STRINGOP_H
|
||||||
#define _SWAY_STRINGOP_H
|
#define _SWAY_STRINGOP_H
|
||||||
#include <stdlib.h>
|
|
||||||
#include "list.h"
|
|
||||||
|
|
||||||
#if !HAVE_DECL_SETENV
|
#include "list.h"
|
||||||
// Not sure why we need to provide this
|
|
||||||
extern int setenv(const char *, const char *, int);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// array of whitespace characters to use for delims
|
// array of whitespace characters to use for delims
|
||||||
extern const char whitespace[];
|
extern const char whitespace[];
|
||||||
|
|
16
meson.build
16
meson.build
|
@ -9,11 +9,17 @@ project(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
add_project_arguments('-Wno-unused-parameter', language: 'c')
|
add_project_arguments(
|
||||||
add_project_arguments('-Wno-unused-function', language: 'c')
|
[
|
||||||
add_project_arguments('-Wno-unused-result', language: 'c')
|
'-DWL_HIDE_DEPRECATED',
|
||||||
add_project_arguments('-DWL_HIDE_DEPRECATED', language: 'c')
|
'-DWLR_USE_UNSTABLE',
|
||||||
add_project_arguments('-DWLR_USE_UNSTABLE', language: 'c')
|
|
||||||
|
'-Wno-unused-parameter',
|
||||||
|
'-Wno-unused-result',
|
||||||
|
'-Wundef',
|
||||||
|
],
|
||||||
|
language: 'c',
|
||||||
|
)
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <wlr/config.h>
|
#include <wlr/config.h>
|
||||||
#include <wlr/backend/multi.h>
|
#include <wlr/backend/multi.h>
|
||||||
#include <wlr/backend/wayland.h>
|
#include <wlr/backend/wayland.h>
|
||||||
#ifdef WLR_HAS_X11_BACKEND
|
#if WLR_HAS_X11_BACKEND
|
||||||
#include <wlr/backend/x11.h>
|
#include <wlr/backend/x11.h>
|
||||||
#endif
|
#endif
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
@ -18,7 +18,7 @@ static void create_output(struct wlr_backend *backend, void *data) {
|
||||||
wlr_wl_output_create(backend);
|
wlr_wl_output_create(backend);
|
||||||
*done = true;
|
*done = true;
|
||||||
}
|
}
|
||||||
#ifdef WLR_HAS_X11_BACKEND
|
#if WLR_HAS_X11_BACKEND
|
||||||
else if (wlr_backend_is_x11(backend)) {
|
else if (wlr_backend_is_x11(backend)) {
|
||||||
wlr_x11_output_create(backend);
|
wlr_x11_output_create(backend);
|
||||||
*done = true;
|
*done = true;
|
||||||
|
|
|
@ -469,15 +469,6 @@ void output_damage_box(struct sway_output *output, struct wlr_box *_box) {
|
||||||
wlr_output_damage_add_box(output->damage, &box);
|
wlr_output_damage_add_box(output->damage, &box);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void output_damage_whole_container_iterator(struct sway_container *con,
|
|
||||||
void *data) {
|
|
||||||
if (!sway_assert(con->view, "expected a view")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
struct sway_output *output = data;
|
|
||||||
output_damage_view(output, con->view, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void output_damage_whole_container(struct sway_output *output,
|
void output_damage_whole_container(struct sway_output *output,
|
||||||
struct sway_container *con) {
|
struct sway_container *con) {
|
||||||
// Pad the box by 1px, because the width is a double and might be a fraction
|
// Pad the box by 1px, because the width is a double and might be a fraction
|
||||||
|
|
Loading…
Reference in a new issue