Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy config.h approach from wlroots-full.hpp to other public api headers #2225

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/api/wayfire/debug.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifndef DEBUG_HPP
#define DEBUG_HPP

#ifndef WAYFIRE_PLUGIN
#include "config.h"
// WF_USE_CONFIG_H is set only when building Wayfire itself, external plugins
// need to use <wayfire/config.h>
#ifdef WF_USE_CONFIG_H
#include <config.h>
#else
#include <wayfire/config.h>
#endif

#define nonull(x) ((x) ? (x) : ("nil"))
Expand Down
8 changes: 5 additions & 3 deletions src/api/wayfire/unstable/wlr-view-events.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#if __has_include(<wayfire/config.h>)
#include <wayfire/config.h>
// WF_USE_CONFIG_H is set only when building Wayfire itself, external plugins
// need to use <wayfire/config.h>
#ifdef WF_USE_CONFIG_H
#include <config.h>
#else
#include "config.h"
#include <wayfire/config.h>
#endif

#include <wayfire/nonstd/wlroots-full.hpp>
Expand Down
8 changes: 5 additions & 3 deletions src/api/wayfire/unstable/xwl-toplevel-base.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#if __has_include(<wayfire/config.h>)
#include <wayfire/config.h>
// WF_USE_CONFIG_H is set only when building Wayfire itself, external plugins
// need to use <wayfire/config.h>
#ifdef WF_USE_CONFIG_H
#include <config.h>
#else
#include "config.h"
#include <wayfire/config.h>
#endif

#include <wayfire/nonstd/wlroots-full.hpp>
Expand Down
Loading