Skip to content

Commit

Permalink
[AlwaysOnTop] Non-selectable border (microsoft#16085)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova authored Feb 7, 2022
1 parent c46ccce commit 49a2218
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/alwaysontop/AlwaysOnTop/WindowBorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool WindowBorder::Init(HINSTANCE hinstance)
m_window = CreateWindowExW(WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW
, NonLocalizable::ToolWindowClassName
, L""
, WS_POPUP
, WS_POPUP | WS_DISABLED
, windowRect.left
, windowRect.top
, windowRect.right - windowRect.left
Expand Down Expand Up @@ -218,6 +218,10 @@ LRESULT WindowBorder::WndProc(UINT message, WPARAM wparam, LPARAM lparam) noexce
case WM_ERASEBKGND:
return TRUE;

// prevent from beeping if the border was clicked
case WM_SETCURSOR:
return TRUE;

default:
{
return DefWindowProc(m_window, message, wparam, lparam);
Expand Down

0 comments on commit 49a2218

Please sign in to comment.