mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
window border #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @es183923 on GitHub (Jul 15, 2022).
Originally assigned to: @LGUG2Z on GitHub.
it would be really nice to have a window border feature, where it can help distinguish between the active and inactive windows. Currently, its not very easy to see which window is active, as there is no standard way of distinguishing between them.
Take VSCode for example. there is no difference in the window when it is active or inactive, and most apps just have the window manage buttons (minimize, maximize, close buttons) slightly dim, and you cant immediately tell.
Having a window border (with rounded corners as an option) would really help fix this.
It can also be used to distinguish if a window is float, etc
@es183923 commented on GitHub (Jul 22, 2022):
PowerToys actually has this as part of the keeping a window topmost. It adds a border as well.
@LGUG2Z commented on GitHub (Jul 22, 2022):
bf2a107d7d/src/modules/alwaysontop/AlwaysOnTop/FrameDrawer.cppfor ref, PowerToys uses the Direct2D API to draw a border directly@LGUG2Z commented on GitHub (Jul 23, 2022):
https://github.com/microsoft/PowerToys/issues/19543
There is a pending issue for this on PowerToys; let's see if this gets prioritized in their backlog. I don't really want to work on this in
komorebibecause the Direct2D API looks like a nightmare to work with. 😅@LGUG2Z commented on GitHub (Jul 25, 2022):
Given that
komorebihas a pretty cohesive overview of the desktop state at any given time, instead of going down the Direct2D route like PowerToys, I am currently trying to implement this with a single window stripped of all decorations that is kept at the bottom of the desktop Z-order which is redrawn in new positions whenever the appropriateWindowManagerEvents take place andSocketMessages are received.It is still intermittently somewhat buggy and I have leaked a fair bit of
unsafecode outside of the safe abstractions I usually write over the Win32 API inwindows_api.rs, but it's possible to enable, disable and set colour on the border withkomorebic:The traditional window shape is kept for Windows 10 and the rounded window shape is used for the border on Windows 11.
Prebuilt binaries for early access are available here and the
feature/active-borderbranch can also be built from source.I'm hoping to be able to merge this to the
masterbranch here by the first week August at the latest. 🎉@es183923 commented on GitHub (Jul 26, 2022):
Suggestion: add an
alphavalue so your borders don't need to be fully opaque.Also, having it implemented this way prevents having multiple borders, which was my original suggestion.
Borders for each window instead of just one allows for:
@LGUG2Z commented on GitHub (Jul 26, 2022):
Alpha sounds like a good idea, I'll take a stab at that later this week: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setlayeredwindowattributes?redirectedfrom=MSDN
Really good arguments in favour of having per-window borders that can be color coded. I would like to add this eventually after settling on the right abstraction for border creation and destruction, and association with visible windows.
@LGUG2Z commented on GitHub (Aug 8, 2022):
This is now out of early access and on the master branch; further work like borders for unfocused windows, different colours and alphas per window types will be tracked in dedicated tickets. 🎉