Author: manolo
Date: 2011-09-30 06:09:06 -0700 (Fri, 30 Sep 2011)
New Revision: 9101
Log:
About STR#2600 : some code factorization.



Modified:
   branches/branch-1.3/FL/Fl.H
   branches/branch-1.3/FL/mac.H
   branches/branch-1.3/src/Fl_cocoa.mm
   branches/branch-1.3/src/Fl_win32.cxx
   branches/branch-1.3/src/screen_xywh.cxx

Modified: branches/branch-1.3/FL/Fl.H
===================================================================
--- branches/branch-1.3/FL/Fl.H 2011-09-30 10:34:52 UTC (rev 9100)
+++ branches/branch-1.3/FL/Fl.H 2011-09-30 13:09:06 UTC (rev 9101)
@@ -133,6 +133,7 @@
   static Fl_Window* modal_;
   static Fl_Window* grab_;
   static int compose_state;
+  static void call_screen_init(); // recompute screen number and dimensions
 #endif
   /**
     If true then flush() will do something.

Modified: branches/branch-1.3/FL/mac.H
===================================================================
--- branches/branch-1.3/FL/mac.H        2011-09-30 10:34:52 UTC (rev 9100)
+++ branches/branch-1.3/FL/mac.H        2011-09-30 13:09:06 UTC (rev 9101)
@@ -126,7 +126,6 @@
   static CGContextRef none_cursor_image(void);
   static void *get_carbon_function(const char *name);
   static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // 
compute work area of a given screen
-  static void mac_screen_init(void); // recompute screen number and dimensions
 private:
   static void relink(Fl_Window*, Fl_Window*);
   bool subwindow;

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-09-30 10:34:52 UTC (rev 9100)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-09-30 13:09:06 UTC (rev 9101)
@@ -1088,7 +1088,7 @@
 - (void)applicationDidChangeScreenParameters:(NSNotification *)unused
 { // react to changes in screen numbers and positions
   main_screen_height = [[[NSScreen screens] objectAtIndex:0] 
frame].size.height;
-  Fl_X::mac_screen_init();
+  Fl::call_screen_init();
   // FLTK windows have already been notified they were moved,
   // but they had the old main_screen_height, so they must be notified again.
   NSArray *windows = [NSApp windows];

Modified: branches/branch-1.3/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_win32.cxx        2011-09-30 10:34:52 UTC (rev 
9100)
+++ branches/branch-1.3/src/Fl_win32.cxx        2011-09-30 13:09:06 UTC (rev 
9101)
@@ -1204,6 +1204,7 @@
     if (fl_msg.message == WM_RENDERALLFORMATS) CloseClipboard();
     return 1;}
   case WM_DISPLAYCHANGE: // occurs when screen configuration (number, 
position) changes
+    Fl::call_screen_init();
     Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL);
     return 0;
 

Modified: branches/branch-1.3/src/screen_xywh.cxx
===================================================================
--- branches/branch-1.3/src/screen_xywh.cxx     2011-09-30 10:34:52 UTC (rev 
9100)
+++ branches/branch-1.3/src/screen_xywh.cxx     2011-09-30 13:09:06 UTC (rev 
9101)
@@ -142,10 +142,6 @@
   num_screens = count;
 }
 
-void Fl_X::mac_screen_init() {
-  screen_init();
-  }
-
 #elif HAVE_XINERAMA
 #  include <X11/extensions/Xinerama.h>
 
@@ -189,6 +185,11 @@
 }
 #endif // WIN32
 
+#ifndef FL_DOXYGEN
+void Fl::call_screen_init() {
+  screen_init();
+}
+#endif
 
 /**
   Gets the number of available screens.

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

Reply via email to