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

Set initial decoration mode properly #2401

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

Conversation

wb9688
Copy link
Contributor

@wb9688 wb9688 commented Jul 21, 2024

This sets the initial decoration mode properly for clients that announce the wl_surface with the decoration protocol before the xdg-surface view, such as GTK 4, so that they are properly decorated.

@ammen99
Copy link
Member

ammen99 commented Jul 27, 2024

I think the real problem is that the following happens:

  • start_map_tx is called
  • decoration plugin sees that we'll map a view but it hasn't got its decorated status updated yet.
  • we update decoration status in the actual map()

So the proper fix would be to have the old code (which just sets the decoration status without calling the function which also emits the decoration updated signal) in start_map_tx. Would you mind trying this out to see whether it works? Because with this patch, the flow of events is like this (and I think it is suboptimal):

  • start_map_tx
  • decoration plugin processes the view with the wrong state
  • we start map()
  • a signal is emitted and the decoration plugin now has to change the view's state in the next transaction

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.

2 participants