Skip to content

Conversation

@mwcampbell
Copy link
Contributor

@mwcampbell mwcampbell commented Dec 21, 2025

So far this is just for the "italic" flag. We can decide later if this makes sense for other flags too.

This also assumes that if a flag is set on a parent, it makes sense for it to be implicitly set on all descendants too. For text attributes like italic style, that are typically set on individual runs anyway, I think this makes sense.

Closes #657

@DataTriny
Copy link
Member

Making hidden an inherited flag would solve #657 but I'm not sure if that is a good idea, given that this would impact all adapters.

@mwcampbell
Copy link
Contributor Author

To fully solve #657, would we also need to somehow modify Tree to fire node_updated on all descendants if the direct value of is_hidden changed on a node?

@DataTriny
Copy link
Member

That would make the AT-SPI adapter simpler, but we can still add or remove the descendants like we already do to some extents. What concerns me is that the most frequent path (where a node has no hidden ancestor) is the most expensive as we always have to go down to the root node.

Anyway, for correctness and completeness, it would make sense to me to call node_updated on descendants when an inherited property changes. Have you looked into how text attributes are exposed on other platforms to know if we would need this?

@mwcampbell
Copy link
Contributor Author

I'm willing to try making is_hidden inherited and see if there's a noticeable performance hit in practice.

Copy link
Member

@DataTriny DataTriny left a comment

Choose a reason for hiding this comment

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

Looks good to me. I've confirmed that this fixes #657.

@DataTriny DataTriny merged commit 176c90c into main Dec 22, 2025
16 checks passed
@DataTriny DataTriny deleted the inherited-flags branch December 22, 2025 17:46
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.

Unix adapter panics with InterfaceNotFound when unregistering D-Bus interfaces

3 participants