-
Notifications
You must be signed in to change notification settings - Fork 333
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
Changing a CALayer in a menu callback doesn't trigger re-draw #2018
base: narwhal
Are you sure you want to change the base?
Conversation
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue. |
Doesn't CALayer do a perform on runloop for that So it seems the real problem is that the run loop doesn't enter a second iteration here. Probably we got to this point via a non-run-loop path and the comment nearby seems to describe a similar problem. So, maybe what we should actually be doing instead of adding more layers of custom calls is to just pump the run loop or schedule an immediate timer. Did you trace this behaviour by any chance? +bug |
Milestone: Someday. Labels: #new, AppKit, bug. What's next? A reviewer should examine this issue. |
-#new |
Milestone: Someday. Labels: AppKit, bug. What's next? A reviewer should examine this issue. |
Milestone: Someday. Labels: #needs-unit-test, AppKit, bug. What's next? This issue needs a volunteer to write and submit one or more unit tests execercising the changes and/or the relevant parts of the original problem. |
The unit tests have been added. |
@zittix @aljungberg What can be done to move this pull request forward? |
On my end, everything looks good. I have added a manual test to cover the issue and the fix does indeed fix it. |
I would love to hear more about what @aljungberg said above, from both of you. Is this the best solution to this problem? |
I think if the part of a |
@zittix Can you test the approach @aljungberg suggested? |
If in a menu action we change some properties of a CALayer such as:
The update is not applied to the layer until the mouse is moved (tested on Safari 7.0 and Chrome 31.0).
The provided fix force the update of the CALayer tree at the end of the menu callback.