diff options
| author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-03-14 13:20:03 +1100 |
|---|---|---|
| committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-03-14 13:20:03 +1100 |
| commit | 4cc22d416e9e5c4efc0b567b7385e589dd285191 (patch) | |
| tree | aaad1690fdd85a413497d5cd54d9926bda36fbea /cocoa | |
| parent | 6c98b5aa4a254bf630554a33d93d5219b519de28 (diff) | |
| download | scintilla-mirror-4cc22d416e9e5c4efc0b567b7385e589dd285191.tar.gz | |
Fix calltip display bug on Cocoa.
Diffstat (limited to 'cocoa')
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index be5ec9445..45637b28a 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1131,7 +1131,16 @@ void ScintillaCocoa::CallTipMouseDown(NSPoint pt) { CallTipClick(); } +static bool HeightDifferent(WindowID wCallTip, PRectangle rc) { + NSWindow *callTip = (NSWindow *)wCallTip; + CGFloat height = NSHeight([callTip frame]); + return height != rc.Height(); +} + void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) { + if (ct.wCallTip.Created() && HeightDifferent(ct.wCallTip.GetID(), rc)) { + ct.wCallTip.Destroy(); + } if (!ct.wCallTip.Created()) { NSRect ctRect = NSMakeRect(rc.top,rc.bottom, rc.Width(), rc.Height()); NSWindow *callTip = [[NSWindow alloc] initWithContentRect: ctRect |
