mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:30:38 +00:00
Lock focus / unlock focus optimizations and fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
72512673b2
commit
2177ef847e
22 changed files with 111 additions and 115 deletions
|
@ -1006,18 +1006,23 @@ buttonCellFrameFromRect(NSRect cellRect)
|
|||
// We can not use performClick: on the button cell here as
|
||||
// the button uses only part of the bounds of the control view.
|
||||
NSWindow *cvWin = [controlView window];
|
||||
|
||||
|
||||
[controlView lockFocus];
|
||||
[_buttonCell highlight: YES
|
||||
withFrame: buttonCellFrameFromRect(cellFrame)
|
||||
inView: controlView];
|
||||
[controlView unlockFocus];
|
||||
[cvWin flushWindow];
|
||||
|
||||
[self _didClick: self];
|
||||
|
||||
[controlView lockFocus];
|
||||
[_buttonCell highlight: NO
|
||||
withFrame: buttonCellFrameFromRect(cellFrame)
|
||||
inView: controlView];
|
||||
[controlView unlockFocus];
|
||||
[cvWin flushWindow];
|
||||
|
||||
}
|
||||
|
||||
- (void) _didClick: (id)sender
|
||||
|
@ -1031,7 +1036,8 @@ buttonCellFrameFromRect(NSRect cellRect)
|
|||
object: popView
|
||||
userInfo: nil];
|
||||
|
||||
// HACK Abort the editing, otherwise the selected value is overwritten by the editor
|
||||
// HACK Abort the editing, otherwise the selected value is
|
||||
// overwritten by the editor
|
||||
//if ([_control_view isKindOfClass: NSControl])
|
||||
[(NSControl *)_control_view abortEditing];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue