[AlwaysOnTop] Non-selectable border (#16085)

This commit is contained in:
Seraphima Zykova 2022-02-07 17:28:26 +03:00 committed by GitHub
parent c46ccce373
commit 49a2218358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -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);