Author: matt
Date: 2009-04-12 12:58:07 -0700 (Sun, 12 Apr 2009)
New Revision: 6756
Log:
Fixed bad system menu hadling in OS X (STR #2153) / Fixed File Input mouse 
pointer dragging (STR #2181)

Modified:
   branches/branch-1.1/CHANGES
   branches/branch-1.1/src/Fl_File_Input.cxx
   branches/branch-1.1/src/Fl_mac.cxx

Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2009-04-12 13:48:03 UTC (rev 6755)
+++ branches/branch-1.1/CHANGES 2009-04-12 19:58:07 UTC (rev 6756)
@@ -1,5 +1,7 @@
 CHANGES IN FLTK 1.1.10
 
+       - Fixed bad system menu hadling in OS X (STR #2153)
+       - Fixed File Input mouse pointer dragging (STR #2181)
        - Updated the bundled libpng to v1.2.35 (released 18 Feb. 2009)
        - Added Fl_Scroll::bbox() documentation (STR #1893)
        - Fixed static linking of image libraries (STR #1962)

Modified: branches/branch-1.1/src/Fl_File_Input.cxx
===================================================================
--- branches/branch-1.1/src/Fl_File_Input.cxx   2009-04-12 13:48:03 UTC (rev 
6755)
+++ branches/branch-1.1/src/Fl_File_Input.cxx   2009-04-12 19:58:07 UTC (rev 
6756)
@@ -198,12 +198,14 @@
       return 1;
 
     case FL_PUSH :
+      inButtonBar = (Fl::event_y() < (y() + DIR_HEIGHT));
     case FL_RELEASE :
     case FL_DRAG :
-      if (Fl::event_y() < (y() + DIR_HEIGHT) || pressed_ >= 0) return 
handle_button(event);
+      if (inButtonBar)
+        return handle_button(event);
+      else
+        return Fl_Input::handle(event);
 
-      return Fl_Input::handle(event);
-
     default :
       if (Fl_Input::handle(event)) {
        damage(FL_DAMAGE_BAR);

Modified: branches/branch-1.1/src/Fl_mac.cxx
===================================================================
--- branches/branch-1.1/src/Fl_mac.cxx  2009-04-12 13:48:03 UTC (rev 6755)
+++ branches/branch-1.1/src/Fl_mac.cxx  2009-04-12 19:58:07 UTC (rev 6756)
@@ -544,8 +544,11 @@
     switch (GetEventKind( event ) )
     {
       case kEventCommandProcess:
-        GetEventParameter( event, kEventParamDirectObject, typeHICommand, 
NULL, sizeof(HICommand), NULL, &cmd );
-        ret = HandleMenu( &cmd );
+        ret = GetEventParameter( event, kEventParamDirectObject, 
typeHICommand, NULL, sizeof(HICommand), NULL, &cmd );
+        if (ret == noErr && (cmd.attributes & kHICommandFromMenu) != 0) 
+          ret = HandleMenu( &cmd );
+        else 
+          ret = eventNotHandledErr;
         break;
     }
     break;

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to