Skip to content

Commit

Permalink
Select the window in the treeview when the hotkey is used
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Nov 1, 2024
1 parent fb98b34 commit 93a8ce0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/WinSpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,7 @@ BOOL WinSpyDlg_OnHotKey(WPARAM id)
{
// Open the window if collapsed.

UINT layout = GetWindowLayout(g_hwndMain);

if (layout == WINSPY_MINIMIZED)
if (GetWindowLayout(g_hwndMain) == WINSPY_MINIMIZED)
{
SetWindowLayout(g_hwndMain, WINSPY_LASTMAX);
}
Expand All @@ -733,6 +731,13 @@ BOOL WinSpyDlg_OnHotKey(WPARAM id)

hwnd = WindowFromPointEx(pt, FALSE, FALSE);
DisplayWindowInfo(hwnd);

// Select the window in the treeview.

if (GetWindowLayout(g_hwndMain) == WINSPY_EXPANDED)
{
WindowTree_Locate(hwnd);
}
}
}

Expand Down

0 comments on commit 93a8ce0

Please sign in to comment.