Skip to content

Add z-index stacking for HTML UI widgets#120

Open
gabrielew wants to merge 1 commit into
mainfrom
2025-10-22/add-z-index-implementation-in-html-framework
Open

Add z-index stacking for HTML UI widgets#120
gabrielew wants to merge 1 commit into
mainfrom
2025-10-22/add-z-index-implementation-in-html-framework

Conversation

@gabrielew
Copy link
Copy Markdown
Owner

Summary

  • add CSS z-index parsing for HTML-driven widgets
  • track widget z-order state and cache sorted children
  • update drawing and hit-testing to respect the computed z-order

Testing

  • not run (not requested)

https://chatgpt.com/codex/tasks/task_e_68f9165ad52c832e8d4d04e694297bfa

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 2160 to 2166
bool UIWidget::propagateOnMouseMove(const Point& mousePos, const Point& mouseMoved, UIWidgetList& widgetList)
{
if (containsPaddingPoint(mousePos)) {
for (const auto& child : m_children) {
const auto& orderedChildren = getChildrenInZOrder();
for (const auto& child : orderedChildren) {
if (child->isExplicitlyVisible() && child->isExplicitlyEnabled() && child->containsPoint(mousePos))
child->propagateOnMouseMove(mousePos, mouseMoved, widgetList);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Mouse move propagation ignores z-index order

Children are fetched via getChildrenInZOrder() but the loop runs forward, so lower z-index widgets handle mouse-move events before higher z-index siblings. When two widgets overlap and the lower z widget’s onMouseMove returns true, the visually top widget never sees the event, defeating the intent of the new stacking logic. Iterating the ordered list in reverse (as propagateOnMouseEvent does) would deliver mouse-move callbacks to the highest z child first.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale label Nov 22, 2025
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.

1 participant