Skip to content

Conversation

@majiayu000
Copy link

Summary

Add methods to set window position and size in physical coordinates:

  • position_physical(x: i32, y: i32)
  • inner_size_physical(width: u32, height: u32)
  • min_inner_size_physical(min_width: u32, min_height: u32)
  • max_inner_size_physical(max_width: u32, max_height: u32)

Usage

// Position window on a specific monitor using physical pixels
let window = WindowBuilder::new(app, "main")
    .position_physical(1920, 0)  // Start of second monitor
    .inner_size_physical(1920, 1080)
    .build()?;

Fixes #5228

@majiayu000 majiayu000 requested a review from a team as a code owner December 26, 2025 03:45
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Dec 26, 2025
@github-actions
Copy link
Contributor

Package Changes Through 51dd9bd

There are 6 changes which include tauri-utils with patch, tauri-build with patch, tauri-cli with patch, tauri-runtime-wry with minor, tauri with minor, tauri-runtime with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.8.1 2.8.2
tauri-bundler 2.7.5 2.7.6
tauri-runtime 2.9.2 2.10.0
tauri-runtime-wry 2.9.3 2.10.0
tauri-codegen 2.5.2 2.5.3
tauri-macros 2.5.2 2.5.3
tauri-plugin 2.5.2 2.5.3
tauri-build 2.5.3 2.5.4
tauri 2.9.5 2.10.0
@tauri-apps/cli 2.9.6 2.9.7
tauri-cli 2.9.6 2.9.7

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@meow2149
Copy link

Summary

Add methods to set window position and size in physical coordinates:

  • position_physical(x: i32, y: i32)
  • inner_size_physical(width: u32, height: u32)
  • min_inner_size_physical(min_width: u32, min_height: u32)
  • max_inner_size_physical(max_width: u32, max_height: u32)

Usage

// Position window on a specific monitor using physical pixels
let window = WindowBuilder::new(app, "main")
    .position_physical(1920, 0)  // Start of second monitor
    .inner_size_physical(1920, 1080)
    .build()?;

Fixes #5228

I really enjoyed reading this PR — the BSD changes and your explanations were thoughtful, clear, and honestly a pleasure to go through.

It made me curious about the person behind the code, so I wanted to say hi 🙂
If you’re open to it, I’d like to follow each other on GitHub and stay in touch. I have a feeling I’d enjoy seeing more of what you work on.

…auri-apps#5228)

Add methods to set window position and size in physical coordinates:
- `position_physical(x: i32, y: i32)`
- `inner_size_physical(width: u32, height: u32)`
- `min_inner_size_physical(min_width: u32, min_height: u32)`
- `max_inner_size_physical(max_width: u32, max_height: u32)`

This allows positioning windows on specific monitors using physical pixels.

Signed-off-by: majiayu000 <[email protected]>
@majiayu000 majiayu000 force-pushed the feat/window-builder-physical-size branch from 51dd9bd to 08eb729 Compare December 29, 2025 14:46
@majiayu000
Copy link
Author

majiayu000 commented Dec 29, 2025

@meow2149 Thanks for your kind words! I really appreciate it 😊 I've followed you back — looking forward to seeing what you're working on too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📬Proposal

Development

Successfully merging this pull request may close these issues.

[feat] Window builder physical size/position

2 participants