bevyengine / bevyengine/bevy

Typify physical/logical position/sizes for windows

Open
#7,099 1 comment 1 reaction 0 assignees View on GitHub
A-Windowing C-Code-Quality C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?
It is easy to mix up physical and logical sizes/positions for windows which might cause subtle issues when scale factors are at play (whether overrides or native).

## What solution would you like?
Create types for position/sizes respective to physical/logical spaces similar to winit's https://docs.rs/winit/0.27.5/winit/dpi/index.html#structs

## What alternative(s) have you considered?
It might make sense to try to encapsulate physical position/size away from the user unless they *really* opt into it, so that everything in logical space. But I think doing both would be the best of both worlds here.

## Additional context
Good reading on *why* scale factors matter:
https://docs.rs/winit/0.27.5/winit/dpi/index.html

Contributor guide

Open the contributing guide

Research direction

Start by inspecting Bevy's existing window position and size APIs, then compare their treatment of logical and physical spaces with winit's DPI types and the linked documentation. Done means the windowing API clearly distinguishes both coordinate spaces and prevents accidental mixing, with the scope validated against scale-factor overrides and native scale factors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.