Skip to content

Popup anchor system refinement - #4646

Open
Murmele wants to merge 19 commits into
rust-windowing:masterfrom
Murmele:popup-anchor
Open

Popup anchor system refinement#4646
Murmele wants to merge 19 commits into
rust-windowing:masterfrom
Murmele:popup-anchor

Conversation

@Murmele

@Murmele Murmele commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Implement possibility to change the anchor properties of a popup on wayland and imitate the behaviour for other platforms which do not support such anchoring system

  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

Tested on:

  • Windows
  • Wayland
  • MacOs
  • X11 Does not support popups

@Murmele Murmele mentioned this pull request Jul 27, 2026
8 tasks
@Murmele
Murmele marked this pull request as ready for review July 28, 2026 05:51
Comment thread winit-appkit/src/window_delegate.rs Outdated
/// attributes were set on a [`WindowType::Window`]. Gates the parent-relative coordinate
/// frame used when applying anchor/gravity/positioner-offset changes.
anchored: bool,
popup_positioner: RefCell<WindowPositioner>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rename to positioner in general

Comment thread winit-appkit/src/window_delegate.rs Outdated
self.emit_move_event();
// `windowDidMove:` isn't triggered when a move is part of a resize (e.g. dragging the
// top or left edge), so popups need repositioning here too.
self.reposition_child_popups();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reposition_child_windows()

Comment thread winit-appkit/src/window_delegate.rs Outdated
Comment thread winit-core/src/window/positioner.rs Outdated
constraint_adjustment: WindowConstraintAdjustment,
(anchor_position, anchor_size): (LogicalPosition<f64>, LogicalSize<f64>),
offset: LogicalPosition<f64>,
popup_size: LogicalSize<f64>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

rename to window_size

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread winit-core/src/window.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant