Fix non-xwayland build

This commit is contained in:
project-repo 2022-03-15 20:47:53 +01:00
commit e10e09025c
3 changed files with 9 additions and 0 deletions

View file

@ -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);
}

View file

@ -30,7 +30,9 @@
#include <wlr/types/wlr_scene.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
#if CG_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "keybinding.h"
#include "message.h"

View file

@ -6,6 +6,7 @@
*
* See the LICENSE file accompanying this file.
*/
#include "config.h"
#include <X11/Xutil.h>
#include <stdbool.h>
@ -13,7 +14,9 @@
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/log.h>
#if CG_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "output.h"
#include "server.h"