linebender / linebender/druid

Subwindow issues on Windows

Open
#1,626 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

shell/win
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

This issue will have to wait on a few enhancements to druid.

One issue is that `WindowLevel` is not implemented for Windows 10. Creating subwindows on Windows 10 uses the `platform::WindowBuilder::build` function that is used to create app level windows. The issue is that this function treats all windows as [overlapped windows](https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#overlapped-windows). As a result dropdowns and other subwindows show up on the taskbar.

For modals, tooltips, and dropdowns they should be [pop up windows](https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#pop-up-windows) I believe.

The last issue is creating a subwindow takes focus away the parent window which is fine depending on the type of subwindow. For something like a tooltip though, it shouldn't take away focus.

A small fix to make the popup windows not show up in the taskbar is to set their extended style to `WS_EX_TOOLWINDOW`. The other fix would be to wait on the work being done to embed child windows within an App window. On Windows 10, setting the parent handle for a popup window prevents the popup window from showing up on the taskbar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Windows implementation of platform::WindowBuilder::build and review how subwindows are created for modals, tooltips, and dropdowns. Check the Druid enhancements mentioned in the issue before changing behavior. Done means Windows subwindows use appropriate popup/taskbar behavior and tooltips do not incorrectly take focus.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.