Skip to content

Commit

Permalink
qt: fix CompositorDCompositionAcrylicSurface causing the interface wi…
Browse files Browse the repository at this point in the history
…ndow to be inactive

CompositorDCompositionAcrylicSurface creates a window itself, which makes the newly
shown interface window to be no longer active.

The interface window is just shown, it should be active. At the same time, the window
CompositorDCompositionAcrylicSurface creates is a dummy window, so it does not
make sense for it to request (and steal from the interface window) activation.
  • Loading branch information
fuzun authored and robUx4 committed Oct 28, 2024
1 parent ed055b9 commit 87e9000
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ try
vlc_assert(!m_dummyWindow);
// lDwmpCreateSharedMultiWindowVisual requires a window with disabled live (thumbnail) preview
// use a hidden dummy window to avoid disabling live preview of main window
m_dummyWindow = ::CreateWindowExA(WS_EX_TOOLWINDOW, "STATIC", "dummy", WS_VISIBLE, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
m_dummyWindow = ::CreateWindowExA(WS_EX_TOOLWINDOW, "STATIC", "dummy", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
if (!m_dummyWindow)
throw DXError("failed to create dummy window", static_cast<HRESULT>(GetLastError()));

ShowWindow(m_dummyWindow, SW_SHOWNOACTIVATE);
int attr = DWM_CLOAKED_APP;
DwmSetWindowAttribute(m_dummyWindow, DWMWA_CLOAK, &attr, sizeof attr);

Expand Down

0 comments on commit 87e9000

Please sign in to comment.