mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 06:13:10 +00:00
REVIEWED: Flags set/clear #5169
This commit is contained in:
parent
5fbf67a630
commit
3cf3b309c6
@ -1861,8 +1861,8 @@ static void WindowMaximizeCallback(GLFWwindow *window, int maximized)
|
|||||||
// GLFW3 WindowFocus Callback, runs when window get/lose focus
|
// GLFW3 WindowFocus Callback, runs when window get/lose focus
|
||||||
static void WindowFocusCallback(GLFWwindow *window, int focused)
|
static void WindowFocusCallback(GLFWwindow *window, int focused)
|
||||||
{
|
{
|
||||||
if (focused) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was maximized
|
if (focused) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
|
||||||
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was restored
|
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLFW3 Window Drop Callback, runs when drop files into window
|
// GLFW3 Window Drop Callback, runs when drop files into window
|
||||||
|
|||||||
@ -423,6 +423,10 @@ void SetWindowState(unsigned int flags)
|
|||||||
{
|
{
|
||||||
RGFW_window_setFloating(platform.window, RGFW_TRUE);
|
RGFW_window_setFloating(platform.window, RGFW_TRUE);
|
||||||
}
|
}
|
||||||
|
if (FLAG_IS_SET(flags, FLAG_WINDOW_ALWAYS_RUN))
|
||||||
|
{
|
||||||
|
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_ALWAYS_RUN);
|
||||||
|
}
|
||||||
if (FLAG_IS_SET(flags, FLAG_WINDOW_TRANSPARENT))
|
if (FLAG_IS_SET(flags, FLAG_WINDOW_TRANSPARENT))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "WINDOW: Framebuffer transparency can only be configured before window initialization");
|
TRACELOG(LOG_WARNING, "WINDOW: Framebuffer transparency can only be configured before window initialization");
|
||||||
|
|||||||
@ -588,6 +588,10 @@ void SetWindowState(unsigned int flags)
|
|||||||
{
|
{
|
||||||
SDL_SetWindowAlwaysOnTop(platform.window, SDL_FALSE);
|
SDL_SetWindowAlwaysOnTop(platform.window, SDL_FALSE);
|
||||||
}
|
}
|
||||||
|
if (FLAG_IS_SET(flags, FLAG_WINDOW_ALWAYS_RUN)
|
||||||
|
{
|
||||||
|
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_ALWAYS_RUN);
|
||||||
|
}
|
||||||
if (FLAG_IS_SET(flags, FLAG_WINDOW_TRANSPARENT))
|
if (FLAG_IS_SET(flags, FLAG_WINDOW_TRANSPARENT))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_TRANSPARENT is not supported on PLATFORM_DESKTOP_SDL");
|
TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_TRANSPARENT is not supported on PLATFORM_DESKTOP_SDL");
|
||||||
|
|||||||
@ -271,7 +271,7 @@ static DWORD MakeWindowStyle(unsigned flags)
|
|||||||
|
|
||||||
// Minimized takes precedence over maximized
|
// Minimized takes precedence over maximized
|
||||||
int mized = MIZED_NONE;
|
int mized = MIZED_NONE;
|
||||||
if (FLAG_CHECK(flags, FLAG_WINDOW_MINIMIZED)) mized = MIZED_MIN;
|
if (FLAG_IS_SET(flags, FLAG_WINDOW_MINIMIZED)) mized = MIZED_MIN;
|
||||||
if (flags & FLAG_WINDOW_MAXIMIZED) mized = MIZED_MAX;
|
if (flags & FLAG_WINDOW_MAXIMIZED) mized = MIZED_MAX;
|
||||||
|
|
||||||
switch (mized)
|
switch (mized)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user