mirror of
https://github.com/glfw/glfw.git
synced 2024-11-15 02:34:36 +00:00
Fixed titlebar refactor
This commit is contained in:
parent
aa91434c64
commit
cb65f3d485
@ -527,7 +527,6 @@ struct _GLFWwindow
|
||||
// Window settings and state
|
||||
GLFWbool resizable;
|
||||
GLFWbool decorated;
|
||||
GLFWbool titlebar;
|
||||
GLFWbool autoIconify;
|
||||
GLFWbool floating;
|
||||
GLFWbool focusOnShow;
|
||||
|
@ -1015,7 +1015,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
if (window->titlebar)
|
||||
if (_glfw.hints.window.titlebar)
|
||||
break;
|
||||
|
||||
if (lParam)
|
||||
@ -1268,7 +1268,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
|
||||
case WM_ACTIVATE:
|
||||
{
|
||||
if (window->titlebar)
|
||||
if (_glfw.hints.window.titlebar)
|
||||
break;
|
||||
|
||||
// Extend the frame into the client area.
|
||||
@ -1284,7 +1284,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
}
|
||||
case WM_NCHITTEST:
|
||||
{
|
||||
if (window->titlebar)
|
||||
if (_glfw.hints.window.titlebar)
|
||||
break;
|
||||
|
||||
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
|
||||
|
@ -852,7 +852,7 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)
|
||||
case GLFW_DECORATED:
|
||||
return window->decorated;
|
||||
case GLFW_TITLEBAR:
|
||||
return window->titlebar;
|
||||
return _glfw.hints.window.titlebar;
|
||||
case GLFW_FLOATING:
|
||||
return window->floating;
|
||||
case GLFW_AUTO_ICONIFY:
|
||||
@ -913,10 +913,10 @@ GLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value)
|
||||
if (!window->monitor)
|
||||
_glfw.platform.setWindowDecorated(window, value);
|
||||
case GLFW_TITLEBAR:
|
||||
if (window->titlebar == value)
|
||||
if (_glfw.hints.window.titlebar == value)
|
||||
return;
|
||||
|
||||
window->titlebar = value;
|
||||
_glfw.hints.window.titlebar = value;
|
||||
if (!window->monitor)
|
||||
_glfw.platform.setWindowTitleBar(window, value);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user