Page MenuHome

UI: Add "Keep on Top" option for Win32 windows
Needs ReviewPublic

Authored by Germano Cavalcante (mano-wii) on Apr 26 2021, 12:38 AM.

Details

Summary

This patch proposes to add this option for Blender non-children windows:

With this option enabled, the window remains on top even when another
application is kept in focus.


Note: This new option is not translated into other languages.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 14220
Build 14220: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Apr 26 2021, 12:38 AM
Germano Cavalcante (mano-wii) created this revision.

Hey, that is really cool! Seems to work perfectly in everything I've tried. Children behave properly, coming in and out of fullscreen works great. "Window / New Window" also works great.

The only thing we'd have to think through is Window / "New Main Window". This gives a large window that is not a child of the main window - so that it can parent other child windows. With this patch applied that new window is immediately pushed behind the main window so can be hard to tell where it went. Might make sense to make that new window topmost as well if the parent creating it is in that state.

  • Add topmost to the new window if the active window is already in that state

I imagine that the most ideal would be to pass the option of topmost as a parameter in the creation of a new Window.
But in Ghost, we need to work on multiple OS, and that turned out to be tricky.

  • Cleanup: call window_is_kept_on_top
  • Optim: 'eventHandled = true'