From: Jan Beich Date: Sat, 13 Mar 2021 21:08:14 +0000 (+0000) Subject: menu,xbm: chase swaywm/wlroots@27fba3df4347 X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c9023dd2c6af25b1b851bf6f61c7eede5def3dde;p=proto%2Flabwc.git menu,xbm: chase swaywm/wlroots@27fba3df4347 $ labwc [...] 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0 00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0 Based on https://github.com/swaywm/sway/commit/66343839b146 --- diff --git a/src/menu/menu.c b/src/menu/menu.c index e1692749..369592d7 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -61,7 +62,7 @@ texture_create(struct server *server, struct wlr_box *geo, const char *text, cairo_surface_flush(surf); unsigned char *data = cairo_image_surface_get_data(surf); struct wlr_texture *texture = wlr_texture_from_pixels(server->renderer, - WL_SHM_FORMAT_ARGB8888, cairo_image_surface_get_stride(surf), + DRM_FORMAT_ARGB8888, cairo_image_surface_get_stride(surf), geo->width, geo->height, data); cairo_destroy(cairo); diff --git a/src/xbm/xbm.c b/src/xbm/xbm.c index af5aae70..09e3b0cc 100644 --- a/src/xbm/xbm.c +++ b/src/xbm/xbm.c @@ -6,6 +6,7 @@ #include #include +#include #include "common/dir.h" #include "common/grab-file.h" @@ -26,7 +27,7 @@ texture_from_pixmap(struct wlr_renderer *renderer, struct pixmap *pixmap) if (!pixmap) { return NULL; } - return wlr_texture_from_pixels(renderer, WL_SHM_FORMAT_ARGB8888, + return wlr_texture_from_pixels(renderer, DRM_FORMAT_ARGB8888, pixmap->width * 4, pixmap->width, pixmap->height, pixmap->data); }