mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 15:44:35 +00:00
Remove decorations when fullscreen
This commit is contained in:
parent
58b21d336c
commit
31cea7fa24
@ -279,7 +279,7 @@ static void resizeWindow(_GLFWwindow* window, int width, int height)
|
|||||||
{
|
{
|
||||||
wl_egl_window_resize(window->wl.native, width, height, 0, 0);
|
wl_egl_window_resize(window->wl.native, width, height, 0, 0);
|
||||||
|
|
||||||
if (!_glfw.wl.viewporter)
|
if (!_glfw.wl.viewporter || !window->wl.decorations.top.surface)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Top decoration.
|
// Top decoration.
|
||||||
@ -443,6 +443,7 @@ static GLFWbool createSurface(_GLFWwindow* window,
|
|||||||
if (!window->wl.transparent)
|
if (!window->wl.transparent)
|
||||||
setOpaqueRegion(window);
|
setOpaqueRegion(window);
|
||||||
|
|
||||||
|
if (window->decorated && !window->monitor)
|
||||||
createDecorations(window);
|
createDecorations(window);
|
||||||
|
|
||||||
return GLFW_TRUE;
|
return GLFW_TRUE;
|
||||||
@ -937,6 +938,8 @@ void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* heigh
|
|||||||
void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
||||||
int* left, int* top,
|
int* left, int* top,
|
||||||
int* right, int* bottom)
|
int* right, int* bottom)
|
||||||
|
{
|
||||||
|
if (window->decorated && !window->monitor)
|
||||||
{
|
{
|
||||||
if (top)
|
if (top)
|
||||||
*top = _GLFW_DECORATION_TOP;
|
*top = _GLFW_DECORATION_TOP;
|
||||||
@ -947,6 +950,7 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
|
|||||||
if (bottom)
|
if (bottom)
|
||||||
*bottom = _GLFW_DECORATION_WIDTH;
|
*bottom = _GLFW_DECORATION_WIDTH;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
|
void _glfwPlatformGetWindowContentScale(_GLFWwindow* window,
|
||||||
float* xscale, float* yscale)
|
float* xscale, float* yscale)
|
||||||
@ -1108,12 +1112,15 @@ void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
|
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
|
||||||
|
{
|
||||||
|
if (!window->monitor)
|
||||||
{
|
{
|
||||||
if (enabled)
|
if (enabled)
|
||||||
createDecorations(window);
|
createDecorations(window);
|
||||||
else
|
else
|
||||||
destroyDecorations(window);
|
destroyDecorations(window);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
|
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user