mirror of
https://github.com/gwm17/glfw.git
synced 2025-01-31 03:18:50 -05:00
Fix _glfwPlatformSetWindowMonitor to correctly destroy/recreate decorations
This commit is contained in:
parent
c9d691e65e
commit
0c4ca85149
|
@ -271,6 +271,9 @@ static void destroyDecoration(_GLFWdecorationWayland* decoration)
|
|||
wl_subsurface_destroy(decoration->subsurface);
|
||||
if (decoration->viewport)
|
||||
wp_viewport_destroy(decoration->viewport);
|
||||
decoration->surface = NULL;
|
||||
decoration->subsurface = NULL;
|
||||
decoration->viewport = NULL;
|
||||
}
|
||||
|
||||
static void destroyDecorations(_GLFWwindow* window)
|
||||
|
@ -476,6 +479,7 @@ static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor, int refres
|
|||
monitor->wl.output);
|
||||
}
|
||||
setIdleInhibitor(window, GLFW_TRUE);
|
||||
destroyDecorations(window);
|
||||
}
|
||||
|
||||
static GLFWbool createShellSurface(_GLFWwindow* window)
|
||||
|
@ -1073,6 +1077,8 @@ void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
|
|||
else if (window->wl.shellSurface)
|
||||
wl_shell_surface_set_toplevel(window->wl.shellSurface);
|
||||
setIdleInhibitor(window, GLFW_FALSE);
|
||||
if (window->decorated)
|
||||
createDecorations(window);
|
||||
}
|
||||
_glfwInputWindowMonitor(window, monitor);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user