Skip to content

Commit

Permalink
Hide all system buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed Jan 4, 2025
1 parent a0bd7c2 commit 28e3d7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CollapseLauncher/Classes/Helper/WindowUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,15 +513,19 @@ private static IntPtr MainWndProc(IntPtr hwnd, uint msg, UIntPtr wParam, IntPtr
const int HTCLIENT = 1;
const int HTCAPTION = 2;
const int HTMINBUTTON = 8;
const int HTMAXBUTTON = 9;
const int HTRIGHT = 11;
const int HTTOP = 12;
const int HTTOPRIGHT = 14;
const int HTCLOSE = 20;

var result = PInvoke.CallWindowProc(OldMainWndProcPtr, hwnd, msg, wParam, lParam);
return result switch
{
// Fix "Ghost Minimize Button" issue
// Hide all system buttons
HTMINBUTTON => HTCLIENT,
HTMAXBUTTON => HTCLIENT,
HTCLOSE => HTCLIENT,
// Fix "Caption Resize" issue
HTRIGHT => HTCAPTION,
HTTOP => HTCAPTION,
Expand Down

0 comments on commit 28e3d7f

Please sign in to comment.