mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-22 19:35:13 +00:00
Currently we have two different ways of determining what Window handle to tie our dialogs too - we either use GetForegroundWindow(), or create a completely new and hidden handle. The associated window determines what process names shows up on notifications, and also which window can't be interacted with while a dialog is open. Both of those approaches aren't really good. In the case of GetForegroundWindow(), it just returns whatever window the user has in focus, which might be a completely different process. With the hidden window, it means the dialog and notification aren't really tied to the QB64-PE program, so you can still interact with the window even when a dialog is open, and the notification doesn't show an exectuable name. To solve this we're now using EnumWindows() to enumerate over all the Windows on the system and find one associated with our ProcessId. We then check if it's the top-level window and return it if it is. If that process fails to find a window (such as if this is a console-only program, or $SCREENHIDE is used) then we check if GetConsoleWindow() gives us a handle and use that. If neither approach works, then we fall back to creating a hidden window so that the dialogs can still work. |
||
---|---|---|
.. | ||
libqb | ||
parts | ||
.gitignore | ||
common.h | ||
libqb.cpp | ||
libqb.h | ||
libqb.mm | ||
msbin.c | ||
mtri1.cpp | ||
mtri1s.cpp | ||
mtri1t.cpp | ||
mtri1ts.cpp | ||
mtri2.cpp | ||
mtri2s.cpp | ||
mtri2t.cpp | ||
mtri2ts.cpp | ||
mtri3.cpp | ||
mtri3s.cpp | ||
mtri3t.cpp | ||
mtri3ts.cpp | ||
mtri4.cpp | ||
mtri4s.cpp | ||
mtri4t.cpp | ||
mtri4ts.cpp | ||
myip.cpp | ||
os.h | ||
purge_all_precompiled_content.bat | ||
purge_all_precompiled_content.command | ||
purge_all_precompiled_content.sh | ||
qbx.cpp | ||
time64.c | ||
time64.h |