diff --git a/keybinding.c b/keybinding.c index 96c0528..d7c84b2 100644 --- a/keybinding.c +++ b/keybinding.c @@ -836,7 +836,11 @@ char *print_view(struct cg_view *view) { char *title_str=view->impl->get_title(view); print_str(&outp_str,"\"title\": \"%s\",\n",title_str==NULL?"":title_str); print_str(&outp_str,"\"coords\": [\"x\":%d,\"y\":%d],\n",view->ox,view->oy); +#if CG_HAS_XWAYLAND print_str(&outp_str,"\"type\": \"%s\",\n",view->type==CG_XWAYLAND_VIEW?"xwayland":"xdg"); +#else + print_str(&outp_str,"\"type\": \"xdg\",\n"); +#endif return dyn_str_to_str(&outp_str); } diff --git a/output.c b/output.c index a31e575..4e78844 100644 --- a/output.c +++ b/output.c @@ -30,7 +30,9 @@ #include #include #include +#if CG_HAS_XWAYLAND #include +#endif #include "keybinding.h" #include "message.h" diff --git a/xwayland.c b/xwayland.c index 086632f..9f42ce8 100644 --- a/xwayland.c +++ b/xwayland.c @@ -6,6 +6,7 @@ * * See the LICENSE file accompanying this file. */ +#include "config.h" #include #include @@ -13,7 +14,9 @@ #include #include #include +#if CG_HAS_XWAYLAND #include +#endif #include "output.h" #include "server.h"