Skip to content

Clarify platform-specific details for Viewport positioning#5715

Merged
lucasmerlin merged 4 commits intoemilk:masterfrom
aspiringLich:viewport-position-docs
Feb 20, 2025
Merged

Clarify platform-specific details for Viewport positioning#5715
lucasmerlin merged 4 commits intoemilk:masterfrom
aspiringLich:viewport-position-docs

Conversation

@aspiringLich
Copy link
Contributor

@aspiringLich aspiringLich commented Feb 12, 2025

On Wayland (and android apparently) it is not possible for applications to position their windows or request the window position (for some reason). This is not specified in the documentation.

proof: winit::set_outer_position, winit::outer_position, winit::inner_position all specify that Android / Wayland are not supported.

@aspiringLich aspiringLich changed the title Clarify platform-specific details for Viewports Clarify platform-specific details for Viewport positioning Feb 12, 2025
Copy link
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@github-actions
Copy link

Preview available at https://egui-pr-preview.github.io/pr/5715-viewport-position-docs
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

Copy link
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

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

Ah, should've realized in the first review, we should mention that this is eframe specific, since it might be different for someone e.g. using bevy_egui. I'll apply the suggestions and merge this now, thanks!

@lucasmerlin lucasmerlin added eframe Relates to epi and eframe docs and examples Improving and adding documentation and examples egui labels Feb 20, 2025
@lucasmerlin lucasmerlin merged commit 27e7303 into emilk:master Feb 20, 2025
25 checks passed
darkwater pushed a commit to darkwater/egui that referenced this pull request Aug 24, 2025
)

On Wayland (and android apparently) it is not possible for applications
to position their windows or request the window position (for some
reason). This is not specified in the documentation.

proof: [`winit::set_outer_position`], [`winit::outer_position`],
[`winit::inner_position`] all specify that Android / Wayland are not
supported.

[`winit::set_outer_position`]:
https://docs.rs/winit/latest/winit/window/struct.Window.html#method.set_outer_position
[`winit::outer_position`]:
https://docs.rs/winit/latest/winit/window/struct.Window.html#method.outer_position
[`winit::inner_position`]:
https://docs.rs/winit/latest/winit/window/struct.Window.html#method.inner_position

* Maybe closes emilk#4469
* the lack of support makes me sad. I believe this makes some items in
emilk#3556 impossible on Wayland. Oh well!

---------

Co-authored-by: lucasmerlin <lucasmeurer96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs and examples Improving and adding documentation and examples eframe Relates to epi and eframe egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

with_position method of ViewportBuilder does not seem to work on wayland

2 participants