mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
fix: Task finished notification showing up regardless of focus state on Windows
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user