mirror of https://github.com/WerWolv/ImHex.git
fix: Revert Windows title bar changes since window wasn't draggable anymore
This commit is contained in:
parent
16adacb722
commit
4093fadcae
|
@ -33,7 +33,6 @@ namespace hex {
|
||||||
static LONG_PTR s_oldWndProc;
|
static LONG_PTR s_oldWndProc;
|
||||||
static float s_titleBarHeight;
|
static float s_titleBarHeight;
|
||||||
static Microsoft::WRL::ComPtr<ITaskbarList4> s_taskbarList;
|
static Microsoft::WRL::ComPtr<ITaskbarList4> s_taskbarList;
|
||||||
static bool s_mouseButtonDown = false;
|
|
||||||
|
|
||||||
void nativeErrorMessage(const std::string &message) {
|
void nativeErrorMessage(const std::string &message) {
|
||||||
log::fatal(message);
|
log::fatal(message);
|
||||||
|
@ -132,12 +131,6 @@ namespace hex {
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_MOUSELAST:
|
case WM_MOUSELAST:
|
||||||
break;
|
break;
|
||||||
case WM_NCLBUTTONDOWN:
|
|
||||||
s_mouseButtonDown = true;
|
|
||||||
break;
|
|
||||||
case WM_NCLBUTTONUP:
|
|
||||||
s_mouseButtonDown = false;
|
|
||||||
break;
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
case WM_NCPAINT:
|
case WM_NCPAINT:
|
||||||
// Handle Windows Aero Snap
|
// Handle Windows Aero Snap
|
||||||
|
@ -229,14 +222,12 @@ namespace hex {
|
||||||
return HTBOTTOMRIGHT;
|
return HTBOTTOMRIGHT;
|
||||||
case RegionClient:
|
case RegionClient:
|
||||||
default:
|
default:
|
||||||
if (cursor.y < (window.top + s_titleBarHeight * 2) && !s_mouseButtonDown) {
|
if (cursor.y < (window.top + s_titleBarHeight * 2)) {
|
||||||
if (hoveredWindowName == "##MainMenuBar" || hoveredWindowName == "ImHexDockSpace") {
|
if (hoveredWindowName == "##MainMenuBar" || hoveredWindowName == "ImHexDockSpace") {
|
||||||
if (!ImGui::IsAnyItemHovered()) {
|
if (!ImGui::IsAnyItemHovered()) {
|
||||||
return HTCAPTION;
|
return HTCAPTION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return HTCLIENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue