diff --git a/WINGs/wclient_wl.c b/WINGs/wclient_wl.c index e3a74f4..18a66be 100644 --- a/WINGs/wclient_wl.c +++ b/WINGs/wclient_wl.c @@ -31,6 +31,8 @@ #include "WINGsP.h" +#include + #include #include "xdg-shell-client-protocol.h" @@ -1032,13 +1034,13 @@ W_WLClientShutdown(struct W_Screen *scrPtr) */ static WMScreen *wlclient_open(const char *display) { - /* Tell WMCreateScreenWithRContext to install the Wayland WINGs - * backends (font/event/render/view/color all -> _WL variants). */ + RContext *rc = RCreateContextWayland(1, 1, NULL); + if (!rc) return NULL; + W_SetNextScreenKind(WM_SCREEN_KIND_WAYLAND); - WMScreen *scr = WMCreateScreenWithRContext(NULL, 0, NULL); + WMScreen *scr = WMCreateScreenWithRContext(NULL, 0, rc); if (!scr) return NULL; if (!W_WLClientInit(scr, display)) { - /* TODO: WMCloseScreen(scr) — currently leaks the failed screen. */ return NULL; } scr->aflags.hasAppIcon = 0;