fix: Task finished notification showing up regardless of focus state on Windows

This commit is contained in:
WerWolv
2026-01-03 10:48:46 +01:00
parent 5756105347
commit 3274649b77
4 changed files with 22 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ EXPORT_MODULE namespace hex {
void setMainWindowSize(u32 width, u32 height);
void setMainDockSpaceId(ImGuiID id);
void setMainWindowHandle(GLFWwindow *window);
void setMainWindowFocusState(bool focused);
void setGlobalScale(float scale);
void setNativeScale(float scale);
@@ -161,6 +162,12 @@ EXPORT_MODULE namespace hex {
*/
GLFWwindow* getMainWindowHandle();
/**
* @brief Checks if the main window is currently focused
* @return Whether the main window is focused
*/
bool isMainWindowFocused();
/**
* @brief Checks if borderless window mode is enabled currently
* @return Whether borderless window mode is enabled

View File

@@ -538,6 +538,11 @@ namespace hex {
s_mainWindowHandle = window;
}
static bool s_mainWindowFocused = false;
void setMainWindowFocusState(bool focused) {
s_mainWindowFocused = focused;
}
static float s_globalScale = 1.0;
void setGlobalScale(float scale) {
@@ -708,6 +713,10 @@ namespace hex {
return impl::s_mainWindowHandle;
}
bool isMainWindowFocused() {
return impl::s_mainWindowFocused;
}
bool isBorderlessWindowModeEnabled() {
return impl::s_borderlessWindowMode;
}