mirror of
https://github.com/swaywm/sway.git
synced 2026-04-20 06:47:03 -04:00
Use #if instead of #ifdef
This commit is contained in:
parent
eda3bfeed5
commit
cad851805b
23 changed files with 85 additions and 85 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include <wlr/types/wlr_server_decoration.h>
|
||||
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
||||
#include "config.h"
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#if HAVE_XWAYLAND
|
||||
#include <wlr/xwayland.h>
|
||||
#endif
|
||||
#include "list.h"
|
||||
|
|
@ -101,7 +101,7 @@ const char *view_get_instance(struct sway_view *view) {
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#if HAVE_XWAYLAND
|
||||
uint32_t view_get_x11_window_id(struct sway_view *view) {
|
||||
if (view->impl->get_int_prop) {
|
||||
return view->impl->get_int_prop(view, VIEW_PROP_X11_WINDOW_ID);
|
||||
|
|
@ -136,7 +136,7 @@ const char *view_get_shell(struct sway_view *view) {
|
|||
return "xdg_shell_v6";
|
||||
case SWAY_VIEW_XDG_SHELL:
|
||||
return "xdg_shell";
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#if HAVE_XWAYLAND
|
||||
case SWAY_VIEW_XWAYLAND:
|
||||
return "xwayland";
|
||||
#endif
|
||||
|
|
@ -484,7 +484,7 @@ static struct sway_workspace *select_workspace(struct sway_view *view) {
|
|||
|
||||
// Check if there's a PID mapping
|
||||
pid_t pid;
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#if HAVE_XWAYLAND
|
||||
if (view->type == SWAY_VIEW_XWAYLAND) {
|
||||
struct wlr_xwayland_surface *surf =
|
||||
wlr_xwayland_surface_from_wlr_surface(view->surface);
|
||||
|
|
@ -802,7 +802,7 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
|
|||
wlr_xdg_surface_v6_from_wlr_surface(wlr_surface);
|
||||
return view_from_wlr_xdg_surface_v6(xdg_surface_v6);
|
||||
}
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#if HAVE_XWAYLAND
|
||||
if (wlr_surface_is_xwayland_surface(wlr_surface)) {
|
||||
struct wlr_xwayland_surface *xsurface =
|
||||
wlr_xwayland_surface_from_wlr_surface(wlr_surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue