Skip to content

Commit

Permalink
🪟 Simplify windowing code, remove clickthrough (#35)
Browse files Browse the repository at this point in the history
This change simplifies the host window, removing clickthrough and
layered support.

This allows the host window to be focused when clicked on as expected by
users, and removes the overhead imposed by setting layering and input
transparency.
  • Loading branch information
haydenmc authored Oct 5, 2024
1 parent 64f9a53 commit ef56c62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FlashCom/View/HostWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ namespace
LONG extendedStyles{ GetWindowLongW(hWnd, GWL_EXSTYLE) };
LONG newStyles
{
// See https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features/
// and https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
extendedStyles |
WS_EX_LAYERED | // https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features
WS_EX_TOOLWINDOW | // Don't show in taskbar/switcher
WS_EX_TOPMOST | // Always on top
WS_EX_TRANSPARENT // Make layered window clickthrough
WS_EX_TOPMOST // Always on top
};
SetWindowLongW(hWnd, GWL_EXSTYLE, newStyles);

Expand Down

0 comments on commit ef56c62

Please sign in to comment.