Rename wayland functions

This commit is contained in:
Milan Nikolic 2024-02-26 09:25:40 +01:00
parent ce43cc1f10
commit 8596a5db72
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
2 changed files with 9 additions and 9 deletions

View file

@ -257,7 +257,7 @@ static const struct wl_callback_listener libdecorReadyListener =
// Create key code translation tables // Create key code translation tables
// //
static void createKeyTables(void) static void createKeyTablesWL(void)
{ {
memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes)); memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes));
memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes)); memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes));
@ -821,7 +821,7 @@ int _glfwInitWayland(void)
_glfw.wl.registry = wl_display_get_registry(_glfw.wl.display); _glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);
wl_registry_add_listener(_glfw.wl.registry, &registryListener, NULL); wl_registry_add_listener(_glfw.wl.registry, &registryListener, NULL);
createKeyTables(); createKeyTablesWL();
_glfw.wl.xkb.context = xkb_context_new(0); _glfw.wl.xkb.context = xkb_context_new(0);
if (!_glfw.wl.xkb.context) if (!_glfw.wl.xkb.context)

View file

@ -498,7 +498,7 @@ static void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)
// Make the specified window and its video mode active on its monitor // Make the specified window and its video mode active on its monitor
// //
static void acquireMonitor(_GLFWwindow* window) static void acquireMonitorWL(_GLFWwindow* window)
{ {
if (window->wl.libdecor.frame) if (window->wl.libdecor.frame)
{ {
@ -519,7 +519,7 @@ static void acquireMonitor(_GLFWwindow* window)
// Remove the window and restore the original video mode // Remove the window and restore the original video mode
// //
static void releaseMonitor(_GLFWwindow* window) static void releaseMonitorWL(_GLFWwindow* window)
{ {
if (window->wl.libdecor.frame) if (window->wl.libdecor.frame)
libdecor_frame_unset_fullscreen(window->wl.libdecor.frame); libdecor_frame_unset_fullscreen(window->wl.libdecor.frame);
@ -1156,7 +1156,7 @@ static GLFWbool flushDisplay(void)
return GLFW_TRUE; return GLFW_TRUE;
} }
static int translateKey(uint32_t scancode) static int translateKeyWL(uint32_t scancode)
{ {
if (scancode < sizeof(_glfw.wl.keycodes) / sizeof(_glfw.wl.keycodes[0])) if (scancode < sizeof(_glfw.wl.keycodes) / sizeof(_glfw.wl.keycodes[0]))
return _glfw.wl.keycodes[scancode]; return _glfw.wl.keycodes[scancode];
@ -1270,7 +1270,7 @@ static void handleEvents(double* timeout)
for (uint64_t i = 0; i < repeats; i++) for (uint64_t i = 0; i < repeats; i++)
{ {
_glfwInputKey(_glfw.wl.keyboardFocus, _glfwInputKey(_glfw.wl.keyboardFocus,
translateKey(_glfw.wl.keyRepeatScancode), translateKeyWL(_glfw.wl.keyRepeatScancode),
_glfw.wl.keyRepeatScancode, _glfw.wl.keyRepeatScancode,
GLFW_PRESS, GLFW_PRESS,
_glfw.wl.xkb.modifiers); _glfw.wl.xkb.modifiers);
@ -1773,7 +1773,7 @@ static void keyboardHandleKey(void* userData,
if (!window) if (!window)
return; return;
const int key = translateKey(scancode); const int key = translateKeyWL(scancode);
const int action = const int action =
state == WL_KEYBOARD_KEY_STATE_PRESSED ? GLFW_PRESS : GLFW_RELEASE; state == WL_KEYBOARD_KEY_STATE_PRESSED ? GLFW_PRESS : GLFW_RELEASE;
@ -2509,12 +2509,12 @@ void _glfwSetWindowMonitorWayland(_GLFWwindow* window,
} }
if (window->monitor) if (window->monitor)
releaseMonitor(window); releaseMonitorWL(window);
_glfwInputWindowMonitor(window, monitor); _glfwInputWindowMonitor(window, monitor);
if (window->monitor) if (window->monitor)
acquireMonitor(window); acquireMonitorWL(window);
else else
_glfwSetWindowSizeWayland(window, width, height); _glfwSetWindowSizeWayland(window, width, height);
} }