[PR #624] [CLOSED] komorebi{,-core}: use window bounds without shadow #1025

Closed
opened 2026-01-05 14:53:47 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/624
Author: @raggi
Created: 1/5/2024
Status: Closed

Base: masterHead: window-size


📝 Commits (1)

  • 0802c1d komorebi{,-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.

## 📋 Pull Request Information **Original PR:** https://github.com/LGUG2Z/komorebi/pull/624 **Author:** [@raggi](https://github.com/raggi) **Created:** 1/5/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `window-size` --- ### 📝 Commits (1) - [`0802c1d`](https://github.com/LGUG2Z/komorebi/commit/0802c1d7860298a792f4aad7c697d98637d10dfe) komorebi{,-core}: use window bounds without shadow ### 📊 Changes **2 files changed** (+21 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `komorebi-core/src/rect.rs` (+10 -0) 📝 `komorebi/src/windows_api.rs` (+11 -2) </details> ### 📄 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! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-01-05 14:53:47 +01:00
adam closed this issue 2026-01-05 14:53:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1025