mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 16:42:58 +00:00
Fix for menus not redrawing correctly after closing in non-Safari browsers.
Closes #495. Reviewed by me.
This commit is contained in:
1 parent
49f3038737
commit
39f3e7b292
1 file changed
+14
-6
+14
-6
@@ -886,6 +886,13 @@ var _CPMenuBarVisible = NO,
|
||||
subtype:0
|
||||
data1:0
|
||||
data2:0]];
|
||||
|
||||
// FIXME: We need to do this because this happens in a limitDateForMode:, thus
|
||||
// the second limitDateForMode: won't take effect and the perform selector that
|
||||
// actually draws also won't go into effect. In Safari this works because it sends
|
||||
// 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];
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
@@ -980,13 +987,14 @@ var _CPMenuBarVisible = NO,
|
||||
*/
|
||||
- (void)_highlightItemAtIndex:(int)anIndex
|
||||
{
|
||||
var previousHighlightedIndex = _highlightedIndex;
|
||||
|
||||
if (_highlightedIndex === anIndex)
|
||||
return;
|
||||
|
||||
if (_highlightedIndex !== CPNotFound)
|
||||
[[_items[_highlightedIndex] _menuItemView] highlight:NO];
|
||||
|
||||
_highlightedIndex = anIndex;
|
||||
|
||||
if (previousHighlightedIndex !== CPNotFound)
|
||||
[[_items[previousHighlightedIndex] _menuItemView] highlight:NO];
|
||||
|
||||
|
||||
if (_highlightedIndex !== CPNotFound)
|
||||
[[_items[_highlightedIndex] _menuItemView] highlight:YES];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user