Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/changelog/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ changelog entry.
- Removed `KeyEventExtModifierSupplement`, and made the fields `text_with_all_modifiers` and
`key_without_modifiers` public on `KeyEvent` instead.
- Move `window::Fullscreen` to `monitor::Fullscreen`.
- On Windows, adjusted the border size in undecorated shadow mode to improve gripability.

### Removed

Expand Down
6 changes: 4 additions & 2 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,10 @@ unsafe fn public_window_callback_inner(
// Unfortunately this results in janky resize behavior, where the compositor is
// ahead of the window surface. Currently, there seems no option to achieve this
// with the Windows API.
params.rgrc[0].top += 1;
params.rgrc[0].bottom += 1;

params.rgrc[0].bottom -= 2;
params.rgrc[0].left += 2;
params.rgrc[0].right -= 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which coordinates it is? logical or physical? I'd assume you generally want to apply scaling for it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adjustments might be using logical coordinates. Should I adapt them for DPI scaling?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that if you have DPR 2, the area where you can grip should match logically if you had DPR 1, otherwise on high DPI monitor you won't be able to grab anything.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll try adding DPI scaling tomorrow and test it on a high-DPI monitor (if I can find one).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just change settings in windows to scale.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...thanks!

}

result = ProcResult::Value(0);
Expand Down