Skip to content
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

Fix popups position on X11 #14551

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

marysaka
Copy link
Contributor

@marysaka marysaka commented Feb 8, 2024

567561e caused the origin of window to not be (0, 0) for popups on X.

As a result, all popups were wrongly positioned.

This change Position to translate from root window coordinates (the display space) to parent window coordinates.

I also changed every X calls to depends on the correct parent in X11Window.

This is a major regression in Avalonia 11.0.8, sorry about that. 😅

This time tested under KDE Plasma 5 and gamescope.

Signed-off-by: Mary Guillemard <mary@mary.zone>
…X11Window.Position

567561e caused the origin of window to not be (0, 0) for popups on X.

As a result, all popups were wrongly positioned.

This change Position to translate from root window coordinates (the display space) to parent window coordinates.

Signed-off-by: Mary Guillemard <mary@mary.zone>
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044670-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

No worries.
We are going to release 11.0.9 soon, as there is another critical due to incorrectly backported PR.

@maxkatz6 maxkatz6 merged commit 06f88f6 into AvaloniaUI:master Feb 9, 2024
6 checks passed
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Feb 9, 2024
maxkatz6 pushed a commit that referenced this pull request Feb 9, 2024
* Ensure to use the appropriate parent when talking with X11 in X11Window

Signed-off-by: Mary Guillemard <mary@mary.zone>

* Translate root window coordinates to window coordinates when setting X11Window.Position

567561e caused the origin of window to not be (0, 0) for popups on X.

As a result, all popups were wrongly positioned.

This change Position to translate from root window coordinates (the display space) to parent window coordinates.

Signed-off-by: Mary Guillemard <mary@mary.zone>

---------

Signed-off-by: Mary Guillemard <mary@mary.zone>
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 9, 2024
@kekekeks
Copy link
Member

Setting popup window parent makes it to be constrained to the window. Which is not desired behavior. So both PRs will be reverted as regressions.

kekekeks added a commit that referenced this pull request Feb 10, 2024
kekekeks added a commit that referenced this pull request Feb 10, 2024
* Revert "Fix popups position on X11 (#14551)"

This reverts commit 06f88f6.

* Revert "Use popupParent as X11 parent window (#14366)"

This reverts commit 0bde86b.
kekekeks added a commit that referenced this pull request Feb 10, 2024
* Revert "Fix popups position on X11 (#14551)"

This reverts commit 06f88f6.

* Revert "Use popupParent as X11 parent window (#14366)"

This reverts commit 0bde86b.
maxkatz6 pushed a commit that referenced this pull request Feb 14, 2024
* Revert "Fix popups position on X11 (#14551)"

This reverts commit 06f88f6.

* Revert "Use popupParent as X11 parent window (#14366)"

This reverts commit 0bde86b.
amurgshere pushed a commit to amurgshere/Ryujinx that referenced this pull request Oct 2, 2024
This reverts commit dfc0819.

X popup position broke entirely (my fault oops), waiting for next release with a fix
(see AvaloniaUI/Avalonia#14551)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants