FLTK logo

[Library] r9034 - branches/branch-1.3/src

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r9034 - branches/branch-1.3/src fltk-dev Sep 13, 2011  
 
Author: manolo
Date: 2011-09-13 06:03:07 -0700 (Tue, 13 Sep 2011)
New Revision: 9034
Log:
Mac OS: - Correct application hiding when modal or menu window is on.
              - Removed useless FL_FOCUS events when unhiding application.

Modified:
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm	2011-09-08 10:56:51 UTC (rev 9033)
+++ branches/branch-1.3/src/Fl_cocoa.mm	2011-09-13 13:03:07 UTC (rev 9034)
@@ -1069,7 +1069,7 @@
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
     Fl_Window *win = x->w;
-    if (win && cw) {
+    if (win && cw && [cw isVisible]) {
       if (win->modal()) {
         [cw setLevel:NSModalPanelWindowLevel];
         if (topModal) 
@@ -1113,7 +1113,7 @@
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
     Fl_Window *win = x->w;
-    if (win && cw) {
+    if (win && cw && [cw isVisible]) {
       if (win->modal()) {
         [cw setLevel:NSNormalWindowLevel];
         if (top) [cw orderWindow:NSWindowAbove relativeTo:[top windowNumber]];
@@ -1124,7 +1124,7 @@
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
     Fl_Window *win = x->w;
-    if (win && cw) {
+    if (win && cw && [cw isVisible]) {
       if (win->non_modal()) {
         [cw setLevel:NSNormalWindowLevel];
         if (top) [cw orderWindow:NSWindowAbove relativeTo:[top windowNumber]];
@@ -1150,7 +1150,6 @@
   for (x = Fl_X::first;x;x = x->next) {
     Fl_Window *w = x->w;
     if ( !w->parent() ) {
-      if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle( FL_FOCUS, w);
       Fl::handle( FL_SHOW, w);
       }
   }

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.