rename MwWaylandAlwaysRender to MwWaylandVulkan

This commit is contained in:
IoIxD 2026-05-20 02:43:22 -07:00
commit 637015e4d5
4 changed files with 13 additions and 6 deletions

View file

@ -144,7 +144,12 @@ typedef struct wayland_call_table {
} wayland_call_table_t;
extern wayland_call_table_t wl_call_tbl;
extern MwBool MwWaylandAlwaysRender;
#ifdef MW_VULKAN
extern MwBool MwWaylandVulkan;
#else
#define MwWaylandVulkan 0
#endif
/* defined inline right here so that it doesn't conflict with the other macros */
MwInline int wayland_load_funcs() {
#ifdef __APPLE__

View file

@ -798,7 +798,7 @@ static void keyboard_key(void* data,
}
}
if(!MwWaylandAlwaysRender) {
if(!MwWaylandVulkan) {
MwLLDispatch(self, draw, NULL);
}

View file

@ -6,7 +6,9 @@
#include "../../../external/stb_ds.h"
wayland_call_table_t wl_call_tbl;
MwBool MwWaylandAlwaysRender = MwFALSE;
#ifdef MW_VULKAN
MwBool MwWaylandVulkan = MwFALSE;
#endif
static pthread_mutex_t destroyedWidgetsTableMutex;
/*
@ -1100,7 +1102,7 @@ static int MwLLPendingImpl(MwLL handle) {
handle->wayland.did_initial_resize = 1;
}
if(!MwWaylandAlwaysRender) {
if(!MwWaylandVulkan) {
wl_display_prepare_read(handle->wayland.display);
if(!poll(&fd, 1, timeout.tv_nsec)) {
wl_display_cancel_read(handle->wayland.display);
@ -1127,7 +1129,7 @@ static int MwLLPendingImpl(MwLL handle) {
static void MwLLNextEventImpl(MwLL handle) {
WIDGET_CHECK(handle);
if(!MwWaylandAlwaysRender) {
if(!MwWaylandVulkan) {
if(handle->wayland.did_event_loop_early) {
handle->wayland.did_event_loop_early = MwFALSE;
} else {

View file

@ -242,7 +242,7 @@ static int vulkan_instance_setup(MwWidget handle, vulkan_t* o) {
if(handle->lowlevel->common.type == MwLLBackendWayland) {
arrput(o->enabledExtensions, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
/* take this opprutunity to set the widget to always render */
MwWaylandAlwaysRender = MwTRUE;
MwWaylandVulkan = MwTRUE;
}
#endif
#ifdef USE_COCOA