rust-windowing / rust-windowing/winit

`dpi`: add types for rectangles

Open
#3,956 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S - enhancement
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

Description

This will be necessary for #3928/#403.

Wayland has the most restrictive design for positioning popups; so attributes for popup position will roughly follow Wayland's xdg_positioner. This requires rectangles.

While you could just use dpi::Position and dpi::Size, it's not nearly as idiomatic, and generally speaking, you want both position and size to be of the same type (physical/logical).

Relevant platforms

Windows, macOS, Wayland, X11, Web, iOS, Android

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the dpi::Position and dpi::Size definitions and review the positioning requirements in #3928 and #403. Add the rectangle types needed for matching physical and logical position and size values, with support for the listed platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, mobile
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.