[client] resources: clean up icon handling

This commit turns the icon handling into using a macro so we don't need to do
weird conversions from unsigned long (needed by X11) to uint32_t (needed by
Wayland).

Also simplified the error handling path on Wayland.
This commit is contained in:
Quantum
2026-07-17 20:55:57 -04:00
committed by Geoffrey McRae
parent 6a9957650c
commit 47aebcda0c
5 changed files with 529 additions and 586 deletions

View File

@@ -52,6 +52,7 @@
#endif
#include "app.h"
#include "common/array.h"
#include "common/debug.h"
#include "common/time.h"
#include "common/event.h"
@@ -80,6 +81,10 @@ enum {
MWM_FUNC_CLOSE = (1L << 5)
};
static const unsigned long icondata[] = {
LG_ICON_WIDTH, LG_ICON_HEIGHT, LG_ICON_PIXELS,
};
// forwards
static void x11SetFullscreen(bool fs);
static int x11EventThread(void * unused);
@@ -617,7 +622,7 @@ static bool x11Init(const LG_DSInitParams params)
32,
PropModeReplace,
(unsigned char *)icondata,
icondataSize / sizeof(icondata[0])
ARRAY_LENGTH(icondata)
);
/* create the blank cursor */