Skip to content

shell/grabs: Adjust reactive popups when window is moved #1369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcz-self
Copy link

XDG popups with positioner::reactive should be reconstrained if the window is moved:

When set reactive, the surface is reconstrained if the conditions used for constraining changed, e.g. the parent window moved.


This can be tested with the example from https://codeberg.org/dcz/stiwri :

cargo run --bin popup

This is what it looks like. Laggy because of my computer, but also I think I'm redrawing the surface one frame late.

The popup is allowed to slide to the right if the space to the left is not big enough. Its allowed to flip down if the space above is not big enough.

Screencast_20250423_145018.webm

Before this change, you needed to drag the edge and resize for the popup to move.

This will be very useful for the input method protocol update I'm working on.

Reactive XDG popups should be reconstrained if the window is moved:

> When set reactive, the surface is reconstrained if the conditions used for constraining changed, e.g. the parent window moved.
toplevel,
// TODO: give some thought to round vs floor
(location + offset.as_global().to_f64()).to_i32_round(),
self.window_outputs.iter(),
Copy link
Author

Choose a reason for hiding this comment

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

The outputs are for finding the anchor point and the anchor point must be within the surface, so it will be within the same outputs as the window, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant