summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-12-01 12:56:42 +0000
committerManolo Gouy <Manolo>2010-12-01 12:56:42 +0000
commit5f3988e9341891e93bfd83b675f54d087208eaf2 (patch)
tree5b938ab7066094938fe526818cada2c28b151cd2
parent93135e36f451dd57333c7ecf93413c62a7c50293 (diff)
Fixes STR #2462.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_cocoa.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 8666a252f..79ef1180d 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -614,6 +614,7 @@ static void do_timer(CFRunLoopTimerRef timer, void* data)
- (BOOL)windowShouldClose:(FLWindow *)w;
- (BOOL)containsGLsubwindow;
- (void)setContainsGLsubwindow:(BOOL)contains;
+- (BOOL)canBecomeKeyWindow;
@end
@implementation FLWindow
@@ -650,6 +651,16 @@ static void do_timer(CFRunLoopTimerRef timer, void* data)
{
containsGLsubwindow = contains;
}
+- (BOOL)canBecomeKeyWindow
+{
+ // before 10.5, the default impl of canBecomeKeyWindow is not OK for tooltip windows
+ // we return YES for these windows
+ BOOL retval;
+ Fl_Window *flw = (Fl_Window*)[self getFl_Window];
+ if(fl_mac_os_version < 0x1050 && flw->tooltip_window()) retval = YES;
+ else retval = [super canBecomeKeyWindow];
+ return retval;
+}
@end
/*