Fix XWayland menu positioning by initializing spec from cached geometry#4512
Merged
Fix XWayland menu positioning by initializing spec from cached geometry#4512
Conversation
…ed geometry Co-authored-by: mattkae <25062299+mattkae@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix projects menu positioning in CLion under XWayland
Fix XWayland menu positioning by initializing spec from cached geometry
Dec 8, 2025
TICS Quality Gate✔️ Passedmir
|
AlanGriffiths
approved these changes
Dec 9, 2025
Contributor
AlanGriffiths
left a comment
There was a problem hiding this comment.
Works for menus. (not for tips when hovering over button)
3 tasks
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Dec 18, 2025
https://build.opensuse.org/request/show/1323421 by user sfalken + anag_factory - Update to 2.25.1: * mirplatform ABI bumped to 34 * mirserver ABI bumped to 66 * Bugs Fixed: - Cursor icons don't change with XTerm (gh#canonical/mir#4134) - Fix magnifier filter not consuming events when magnifications is greater/less than the max/min (gh#canonical/mir#4386) - If no specified cursor theme loads, then internal theme (gh#canonical/mir#439) - Renderer: Ensure current EGL context when destroying GL resources (gh#canonical/mir#4460) - Fix XWayland menu positioning by initializing spec from cached geometry (gh#canonical/mir#4512) - Implement wl_subsurface.place_above and place_below with parent z-ordering (gh#canonical/mir#4332) - WindowInfo::clip_area is incorrect if the output is scaled (gh#canonical/mir#44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #???
Related: #???, https://..., ...
What's new?
XWayland menus (e.g., CLion's project menu) were centering on their parent window instead of anchoring to the opening widget. Root cause: during surface creation,
spec.top_leftwasn't initialized fromcached.geometry, causingprep_surface_specto skip theaux_rectconversion logic that positions child windows relative to their parent.Fix: Initialize
spec.top_leftfromcached.geometry.top_leftat surface creation (line 725), matching the existing pattern for width/height initialization.With position set,
prep_surface_specnow:effective_parentaux_rect+ placement hintsHow to test
miral-app --enable-x11 trueChecklist
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.