X11: Cleanup

This commit is contained in:
Camilla Löwy 2026-01-12 19:16:35 +01:00
parent a228a8b447
commit 9352d8fe93

View File

@ -2713,19 +2713,20 @@ void _glfwSetWindowFloatingX11(_GLFWwindow* window, GLFWbool enabled)
// NOTE: We don't check for failure as this property may not exist yet // NOTE: We don't check for failure as this property may not exist yet
// and that's fine (and we'll create it implicitly with append) // and that's fine (and we'll create it implicitly with append)
if (states) unsigned long i;
for (i = 0; i < count; i++)
{ {
for (unsigned long i = 0; i < count; i++) if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
{ break;
if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE) }
{
states[i] = states[count - 1]; if (i < count)
XChangeProperty(_glfw.x11.display, window->x11.handle, {
_glfw.x11.NET_WM_STATE, XA_ATOM, 32, states[i] = states[count - 1];
PropModeReplace, (unsigned char*) states, count - 1); XChangeProperty(_glfw.x11.display, window->x11.handle,
break; _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
} PropModeReplace, (unsigned char*) states, count - 1);
}
} }
if (states) if (states)