diff --git a/src/modules/fancyzones/FancyZonesHook/dllmain.cpp b/src/modules/fancyzones/FancyZonesHook/dllmain.cpp index cc93baf91451..280d7f362735 100644 --- a/src/modules/fancyzones/FancyZonesHook/dllmain.cpp +++ b/src/modules/fancyzones/FancyZonesHook/dllmain.cpp @@ -215,6 +215,31 @@ LRESULT CALLBACK hookWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lP } break; + case WM_NCCALCSIZE: + { + if (wParam) + { + if (IsZoomed(window)) + { + auto ncParams = reinterpret_cast(lParam); + auto rgrcs = reinterpret_cast(ncParams->rgrc); + // I have no clue why this works, but it prevents Chrome and Brave's + // titlebars from quirking, while also allowing GitKraken's titlebar + // to not disappear... + auto r2 = rgrcs[1]; + auto r3 = rgrcs[2]; + if (r2.top == r3.top) + { + return 0 | WVR_REDRAW; + } + } + } + else + { + auto b = reinterpret_cast(lParam); + } + } + break; /** * WM_DESTROY events are generated when the user closes an application * window. If this happens, we need to...