Skip to content

Layered Window issues on Windows and Linux #133

@rombust

Description

@rombust

It has been a while since I tried the Examples/Display/LayeredWindow on Windows.

On Windows 11, it crashes the application inside a Nvidia library.

Looking at: Win32Window::update_layered_worker_thread_process_dwm() (In Sources/Display/Platform/Win32/win32_windows.cpp)

This is used when system is enabled for "DwmFunctions::is_composition_enabled()"

Nearly 4000 Rectangles are produced for the example to pass to ::SetWindowRgn(). This is excessive and would have a significant performance impact (except is crashes the application).

When composition is not enabled, we use the shadow_window technique (using ::UpdateLayeredWindow() ). That I assume is still working.

Both techniques have advantages and disadvantages, but at the moment we cannot choose the desired code path. Maybe a switch in the display window description.

In addition, this example doesn't work on X11 with the cinnamon desktop. You cannot interact with the application.

I am not going to fix it, since I don't need it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions