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
|
// Window settings and state
|
||||||
GLFWbool resizable;
|
GLFWbool resizable;
|
||||||
GLFWbool decorated;
|
GLFWbool decorated;
|
||||||
GLFWbool titlebar;
|
|
||||||
GLFWbool autoIconify;
|
GLFWbool autoIconify;
|
||||||
GLFWbool floating;
|
GLFWbool floating;
|
||||||
GLFWbool focusOnShow;
|
GLFWbool focusOnShow;
|
||||||
|
@ -1015,7 +1015,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
|
|
||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
{
|
{
|
||||||
if (window->titlebar)
|
if (_glfw.hints.window.titlebar)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (lParam)
|
if (lParam)
|
||||||
@ -1268,7 +1268,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
|
|
||||||
case WM_ACTIVATE:
|
case WM_ACTIVATE:
|
||||||
{
|
{
|
||||||
if (window->titlebar)
|
if (_glfw.hints.window.titlebar)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Extend the frame into the client area.
|
// Extend the frame into the client area.
|
||||||
@ -1284,7 +1284,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
}
|
}
|
||||||
case WM_NCHITTEST:
|
case WM_NCHITTEST:
|
||||||
{
|
{
|
||||||
if (window->titlebar)
|
if (_glfw.hints.window.titlebar)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
|
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
|
||||||
|
@ -852,7 +852,7 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)
|
|||||||
case GLFW_DECORATED:
|
case GLFW_DECORATED:
|
||||||
return window->decorated;
|
return window->decorated;
|
||||||
case GLFW_TITLEBAR:
|
case GLFW_TITLEBAR:
|
||||||
return window->titlebar;
|
return _glfw.hints.window.titlebar;
|
||||||
case GLFW_FLOATING:
|
case GLFW_FLOATING:
|
||||||
return window->floating;
|
return window->floating;
|
||||||
case GLFW_AUTO_ICONIFY:
|
case GLFW_AUTO_ICONIFY:
|
||||||
@ -913,10 +913,10 @@ GLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value)
|
|||||||
if (!window->monitor)
|
if (!window->monitor)
|
||||||
_glfw.platform.setWindowDecorated(window, value);
|
_glfw.platform.setWindowDecorated(window, value);
|
||||||
case GLFW_TITLEBAR:
|
case GLFW_TITLEBAR:
|
||||||
if (window->titlebar == value)
|
if (_glfw.hints.window.titlebar == value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
window->titlebar = value;
|
_glfw.hints.window.titlebar = value;
|
||||||
if (!window->monitor)
|
if (!window->monitor)
|
||||||
_glfw.platform.setWindowTitleBar(window, value);
|
_glfw.platform.setWindowTitleBar(window, value);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user