Merge pull request #2018 from vidinoti/patch-1

Changing a CALayer in a menu callback doesn't trigger re-draw
This commit is contained in:
daboe01 authored and GitHub committed 2024-12-30 13:57:56 +01:00
commit c58c5554f9
8 files changed
+384

No files matched your search

+5
View File
@@ -27,6 +27,7 @@
@import "CPKeyValueBinding.j"
@import "CPMenuItem.j"
@import "CALayer.j"
@global CPApp
@@ -1016,6 +1017,10 @@ var _CPMenuBarVisible = NO,
// an additional mouse move after all this, but not in other browsers.
// This will be fixed correctly with the coming run loop changes.
[_CPDisplayServer run];
// If layers are updated within the menu callback, the re-draw & re-layout doesn't occur until a mouse move.
// We force the update here.
[CALayer runLoopUpdateLayers];
}
/* @ignore */