mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #624] [CLOSED] komorebi{,-core}: use window bounds without shadow #1025
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?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/624
Author: @raggi
Created: 1/5/2024
Status: ❌ Closed
Base:
master← Head:window-size📝 Commits (1)
0802c1dkomorebi{,-core}: use window bounds without shadow📊 Changes
2 files changed (+21 additions, -2 deletions)
View changed files
📝
komorebi-core/src/rect.rs(+10 -0)📝
komorebi/src/windows_api.rs(+11 -2)📄 Description
Switch to using the DWM API to get Window bounds so as to exclude the outside of window decorations from the computation.
This is getting close to a precise window size, you can now set an active border width of 1 and an offset of 1 and get a 1 pixel line around most windows, except that there's some extra top padding I have yet to find the cause of.
This implementation needs to be DPI aware, but I haven't yet tested if the DPI scaling approach is entirely valid - we may instead need to get the per-monitor DPI scale, identify the monitor the window is on, and scale to that, rather than using the system wide scale.
Maybe fixes #574
Maybe updates #622
This almost certainly needs some extra testing and potentially some refinement before landing, see the information in the commit message above - but it's a start!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.