summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2012-04-28 00:42:31 +0000
committerFabien Costantini <fabien@onepost.net>2012-04-28 00:42:31 +0000
commite67e798aebfbfdfd6638aab3822d86fe8421adbd (patch)
tree5c5dc14df14b9c62a66b2cc51431b28e91bd42d4
parent16fb1bad6a84af525c7a36d149f4296a4d13433a (diff)
Fixed build break on FLTK_ABI_VERSION >= 10302 introduce in r9293 as extern ref to fl_copy_offscreen would not be found anymore by linker... This can't be captured yet by the Jenkins continous intergration builds as the compilation is for the FLTK_ABIVERSION >= 10302
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9406 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Double_Window.cxx2
-rw-r--r--src/Fl_cocoa.mm23
2 files changed, 23 insertions, 2 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 3c20f8be0..189cae305 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -70,7 +70,7 @@ void Fl_Double_Window::show() {
\param srcx,srcy origin in offscreen buffer of rectangle to copy
*/
#if FLTK_ABI_VERSION >= 10302
-inline void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
+void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
}
#else
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index bd4778286..cc81e23e6 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -564,10 +564,28 @@ static void do_timer(CFRunLoopTimerRef timer, void* data)
{
containsGLsubwindow = contains;
}
+
- (BOOL)canBecomeKeyWindow
{
+ if (Fl::modal_ && (Fl::modal_ != w))
+ return NO; // prevent the caption to be redrawn as active on click
+ // when another modal window is currently the key win
+
+ return !(w->tooltip_window() || w->menu_window());
+}
+
+#if 0
+
+- (BOOL)canBecomeMainWindow
+{
+ if (Fl::modal_ && (Fl::modal_ != w))
+ return NO; // prevent the caption to be redrawn as active on click
+ // when another modal window is currently the key win
+
return !(w->tooltip_window() || w->menu_window());
}
+#endif
+
@end
@interface FLApplication : NSObject
@@ -2107,6 +2125,9 @@ void Fl_X::make(Fl_Window* w)
if ( w->border() || (!w->modal() && !w->tooltip_window()) ) {
Fl_Tooltip::enter(0);
}
+
+ if (w->modal()) Fl::modal_ = w;
+
w->set_visible();
if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle(FL_FOCUS, w);
Fl::first_window(w);
@@ -2129,7 +2150,7 @@ void Fl_X::make(Fl_Window* w)
w->handle(Fl::e_number = FL_SHOW);
Fl::e_number = old_event;
- if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
+ // if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
}
}