Package: sweethome3d / 6.1.2+dfsg-2

no-MacOSX.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
From: Markus Koschany <apo@debian.org>
Date: Mon, 28 Jan 2019 14:42:30 +0100
Subject: no MacOSX

---
 src/com/eteks/sweethome3d/HomeFramePane.java       |   8 +-
 src/com/eteks/sweethome3d/MacOSXConfiguration.java | 868 ---------------------
 src/com/eteks/sweethome3d/SweetHome3D.java         |   9 +-
 .../eteks/sweethome3d/tools/OperatingSystem.java   |   9 +-
 4 files changed, 12 insertions(+), 882 deletions(-)
 delete mode 100644 src/com/eteks/sweethome3d/MacOSXConfiguration.java

diff --git a/src/com/eteks/sweethome3d/HomeFramePane.java b/src/com/eteks/sweethome3d/HomeFramePane.java
index e2b8e09..f3ade00 100644
--- a/src/com/eteks/sweethome3d/HomeFramePane.java
+++ b/src/com/eteks/sweethome3d/HomeFramePane.java
@@ -113,7 +113,7 @@ public class HomeFramePane extends JRootPane implements View {
     List<Image> frameImages = new ArrayList<Image>(3);
     frameImages.add(new ImageIcon(HomeFramePane.class.getResource("resources/frameIcon.png")).getImage());
     frameImages.add(new ImageIcon(HomeFramePane.class.getResource("resources/frameIcon32x32.png")).getImage());
-    if (OperatingSystem.isMacOSXLeopardOrSuperior()) {
+    /*if (OperatingSystem.isMacOSXLeopardOrSuperior()) {
       frameImages.add(new ImageIcon(HomeFramePane.class.getResource("resources/frameIcon128x128.png")).getImage());
     }
     try {
@@ -122,14 +122,14 @@ public class HomeFramePane extends JRootPane implements View {
     } catch (Exception ex) {
       // Call setIconImage available in previous versions
       homeFrame.setIconImage(frameImages.get(0));
-    }
+    }*/
     updateFrameTitle(homeFrame, this.home, this.application);
     // Change component orientation
     applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
 
-    if (OperatingSystem.isMacOSXLionOrSuperior()) {
+    /*if (OperatingSystem.isMacOSXLionOrSuperior()) {
       MacOSXConfiguration.installToolBar(this);
-    }
+    }*/
     // Compute frame size and location
     computeFrameBounds(this.home, homeFrame);
     // Enable windows to update their content while window resizing
diff --git a/src/com/eteks/sweethome3d/MacOSXConfiguration.java b/src/com/eteks/sweethome3d/MacOSXConfiguration.java
deleted file mode 100644
index a78431d..0000000
--- a/src/com/eteks/sweethome3d/MacOSXConfiguration.java
+++ /dev/null
@@ -1,868 +0,0 @@
-/*
- * MacOSXConfiguraton.java 6 sept. 2006
- *
- * Sweet Home 3D, Copyright (c) 2006 Emmanuel PUYBARET / eTeks <info@eteks.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-package com.eteks.sweethome3d;
-
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.EventQueue;
-import java.awt.Frame;
-import java.awt.GradientPaint;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.Insets;
-import java.awt.Point;
-import java.awt.Window;
-import java.awt.event.ActionEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowStateListener;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.imageio.ImageIO;
-import javax.media.j3d.Canvas3D;
-import javax.swing.AbstractAction;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JRootPane;
-import javax.swing.JSplitPane;
-import javax.swing.JToolBar;
-import javax.swing.SwingUtilities;
-import javax.swing.UIManager;
-import javax.swing.border.AbstractBorder;
-import javax.swing.border.Border;
-import javax.swing.border.CompoundBorder;
-import javax.swing.event.AncestorEvent;
-import javax.swing.event.AncestorListener;
-import javax.swing.event.MenuEvent;
-import javax.swing.event.MenuListener;
-import javax.swing.event.MouseInputAdapter;
-
-import com.apple.eawt.AppEvent.FullScreenEvent;
-import com.apple.eawt.Application;
-import com.apple.eawt.ApplicationAdapter;
-import com.apple.eawt.ApplicationEvent;
-import com.apple.eawt.FullScreenAdapter;
-import com.apple.eawt.FullScreenListener;
-import com.apple.eawt.FullScreenUtilities;
-import com.eteks.sweethome3d.model.CollectionEvent;
-import com.eteks.sweethome3d.model.CollectionListener;
-import com.eteks.sweethome3d.model.Home;
-import com.eteks.sweethome3d.model.UserPreferences;
-import com.eteks.sweethome3d.swing.HomePane;
-import com.eteks.sweethome3d.swing.ResourceAction;
-import com.eteks.sweethome3d.swing.SwingTools;
-import com.eteks.sweethome3d.tools.OperatingSystem;
-import com.eteks.sweethome3d.viewcontroller.HomeController;
-import com.sun.j3d.exp.swing.JCanvas3D;
-
-/**
- * Configuration class that accesses to Mac OS X specifics.
- * Do not invoke methods of this class without checking first if
- * <code>os.name</code> System property is <code>Mac OS X</code>.
- * This class requires some classes of <code>com.apple.eawt</code> package
- * to compile.
- * @author Emmanuel Puybaret
- */
-class MacOSXConfiguration {
-  private static boolean fullScreen;
-
-  private MacOSXConfiguration() {
-  }
-
-  /**
-   * Returns <code>true</code> if the screen menu bar is supported.
-   */
-  public static boolean isScreenMenuBarSupported() {
-    if (OperatingSystem.isJavaVersionGreaterOrEqual("1.9")) {
-      try {
-        // Call Desktop.isSupported(Desktop.Action.APP_ABOUT)
-        Class<?> desktopClass = Class.forName("java.awt.Desktop");
-        Object desktopInstance = desktopClass.getMethod("getDesktop").invoke(null);
-        Class<?> desktopActionEnum = Class.forName("java.awt.Desktop$Action");
-        return (Boolean)desktopClass.getMethod("isSupported", desktopActionEnum).invoke(
-            desktopInstance, desktopActionEnum.getField("APP_ABOUT").get(null));
-      } catch (Throwable ex) {
-        return false;
-      }
-    } else {
-      // By default, About menu item is available
-      return Application.getApplication().isAboutMenuItemPresent();
-    }
-  }
-
-  /**
-   * Binds <code>homeApplication</code> to Mac OS X application menu.
-   */
-  public static void bindToApplicationMenu(final SweetHome3D homeApplication) {
-    final Application macosxApplication = Application.getApplication();
-    // Create a default controller for an empty home and disable unrelated actions
-    final HomeController defaultController =
-        homeApplication.createHomeFrameController(homeApplication.createHome()).getHomeController();
-    final HomePane defaultHomeView = (HomePane)defaultController.getView();
-    setDefaultActionsEnabled(defaultHomeView, false);
-    final JMenuBar defaultMenuBar = defaultHomeView.getJMenuBar();
-
-    JFrame frame = null;
-    if (Boolean.getBoolean("apple.laf.useScreenMenuBar")) {
-      if (OperatingSystem.isJavaVersionBetween("1.7", "1.7.0_60")) {
-        // Application#setDefaultMenuBar does nothing under Java 7 < 1.7.0_60
-        frame = createDummyFrameWithDefaultMenuBar(homeApplication, defaultHomeView, defaultMenuBar);
-      } else if (UIManager.getLookAndFeel().getClass().getName().equals(UIManager.getSystemLookAndFeelClassName())) {
-        try {
-          if (OperatingSystem.isJavaVersionGreaterOrEqual("1.9")) {
-            // Call Desktop.setDefaultMenuBar(defaultMenuBar)
-            Class desktopClass = Class.forName("java.awt.Desktop");
-            Object desktopInstance = desktopClass.getMethod("getDesktop").invoke(null);
-            desktopClass.getMethod("setDefaultMenuBar", JMenuBar.class).invoke(desktopInstance, defaultMenuBar);
-          } else {
-            macosxApplication.setDefaultMenuBar(defaultMenuBar);
-          }
-          addWindowMenu(null, defaultMenuBar, homeApplication, defaultHomeView, null);
-        } catch (Throwable ex) {
-          // Create default frame if setDefaultMenuBar isn't available
-          frame = createDummyFrameWithDefaultMenuBar(homeApplication, defaultHomeView, defaultMenuBar);
-        }
-      }
-    }
-
-    final JFrame defaultFrame = frame;
-    boolean applicationListenerSupported = false;
-    try {
-      // Add a listener to Mac OS X application that will call
-      // controller methods of the active frame
-      // Call macosxApplication.addApplicationListener(new MacOSXApplicationListener(homeApplication, defaultController, defaultFrame));
-      macosxApplication.getClass().getMethod("addApplicationListener", Class.forName("com.apple.eawt.ApplicationListener")).invoke(macosxApplication,
-          MacOSXApplicationListener.class.getConstructor(SweetHome3D.class, HomeController.class, JFrame.class).newInstance(homeApplication, defaultController, defaultFrame));
-      macosxApplication.setEnabledAboutMenu(true);
-      macosxApplication.setEnabledPreferencesMenu(true);
-      applicationListenerSupported = true;
-    } catch (NoSuchMethodException ex) {
-    } catch (IllegalAccessException ex) {
-    } catch (InvocationTargetException ex) {
-    } catch (ClassNotFoundException ex) {
-    } catch (InstantiationException ex) {
-    }
-
-    if (!applicationListenerSupported) {
-      // Probably running under Java 9 where previous methods were removed
-      if (OperatingSystem.isJavaVersionGreaterOrEqual("1.9")) {
-        // Use the new handlers of Java 9 once compiling with Java 9 library is enabled
-        /*
-        java.awt.Desktop.getDesktop().setQuitHandler(new java.awt.desktop.QuitHandler() {
-            public void handleQuitRequestWith(java.awt.desktop.QuitEvent ev, java.awt.desktop.QuitResponse answer) {
-              MacOSXConfiguration.handleQuit(homeApplication, defaultController, defaultFrame);
-            }
-          });
-        java.awt.Desktop.getDesktop().setAboutHandler(new java.awt.desktop.AboutHandler() {
-            public void handleAbout(java.awt.desktop.AboutEvent ev) {
-              MacOSXConfiguration.handleAbout(homeApplication, defaultController, defaultFrame);
-            }
-          });
-        java.awt.Desktop.getDesktop().setPreferencesHandler(new java.awt.desktop.PreferencesHandler() {
-            public void handlePreferences(java.awt.desktop.PreferencesEvent ev) {
-              MacOSXConfiguration.handlePreferences(homeApplication, defaultController, defaultFrame);
-            }
-          });
-        java.awt.Desktop.getDesktop().setOpenFileHandler(new java.awt.desktop.OpenFilesHandler() {
-            public void openFiles(java.awt.desktop.OpenFilesEvent ev) {
-              for (java.io.File file : ev.getFiles()) {
-                MacOSXConfiguration.handleOpenFile(homeApplication, file.getAbsolutePath());
-              }
-            }
-          });
-        */
-        try {
-          // Call Desktop.getDesktop().setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
-          // to prevent default call to System#exit
-          Class<?> desktopClass = Class.forName("java.awt.Desktop");
-          Object desktopInstance = desktopClass.getMethod("getDesktop").invoke(null);
-          Class<?> quitStrategyEnum = Class.forName("java.awt.desktop.QuitStrategy");
-          desktopClass.getMethod("setQuitStrategy", quitStrategyEnum).invoke(
-              desktopInstance, quitStrategyEnum.getField("CLOSE_ALL_WINDOWS").get(null));
-        } catch (Exception ex2) {
-          ex2.printStackTrace();
-        }
-      }
-    }
-
-    homeApplication.addHomesListener(new CollectionListener<Home>() {
-      public void collectionChanged(CollectionEvent<Home> ev) {
-        if (ev.getType() == CollectionEvent.Type.ADD) {
-          final JFrame homeFrame = homeApplication.getHomeFrame(ev.getItem());
-          if (!Boolean.getBoolean("com.eteks.sweethome3d.no3D")
-              && !OperatingSystem.isJavaVersionGreaterOrEqual("1.7")) {
-            // To avoid a possible freeze of the program when the user requests a window enlargement
-            // while the frame canvas 3D is instantiated, forbid window to be resized
-            homeFrame.setResizable(false);
-            Executors.newSingleThreadExecutor().submit(new Runnable() {
-                public void run() {
-                  try {
-                    final AtomicBoolean canvas3D = new AtomicBoolean();
-                    do {
-                      Thread.sleep(50);
-                      EventQueue.invokeAndWait(new Runnable() {
-                          public void run() {
-                            canvas3D.set(homeFrame.isShowing()
-                                && isParentOfCanvas3D(homeFrame, Canvas3D.class, JCanvas3D.class));
-                          }
-                        });
-                    } while (!canvas3D.get());
-                  } catch (InterruptedException ex) {
-                  } catch (InvocationTargetException ex) {
-                    ex.printStackTrace();
-                  } finally {
-                    EventQueue.invokeLater(new Runnable() {
-                        public void run() {
-                          homeFrame.setResizable(true);
-                        }
-                      });
-                  }
-                }
-
-                private boolean isParentOfCanvas3D(Container parent, Class<?> ... canvas3DClasses) {
-                  // Search 3D canvas among children and child windows in case the 3D view was detached
-                  for (int i = 0; i < parent.getComponentCount(); i++) {
-                    Component child = parent.getComponent(i);
-                    for (Class<?> canvas3DClass : canvas3DClasses) {
-                      if (canvas3DClass.isInstance(child)
-                          || child instanceof Container
-                            && isParentOfCanvas3D((Container)child, canvas3DClasses)) {
-                        return true;
-                      }
-                    }
-                  }
-                  if (parent instanceof Window) {
-                    for (Window window : ((Window)parent).getOwnedWindows()) {
-                      if (isParentOfCanvas3D(window, canvas3DClasses)) {
-                        return true;
-                      }
-                    }
-                  }
-                  return false;
-                }
-              });
-          }
-          // Add Mac OS X Window menu on new homes
-          MacOSXConfiguration.addWindowMenu(
-              homeFrame, homeFrame.getJMenuBar(), homeApplication, defaultHomeView, ev.getItem());
-
-          if (OperatingSystem.isJavaVersionBetween("1.7", "1.7.0_60")) {
-            // Help system to understand it should display the main menu of one of the remaining windows when a window is closed
-            homeFrame.addWindowListener(new WindowAdapter() {
-                @Override
-                public void windowClosed(WindowEvent ev) {
-                  if (defaultFrame != null) {
-                    List<Home> homes = homeApplication.getHomes();
-                    defaultFrame.setVisible(false);
-                    defaultFrame.setVisible(true);
-                    if (homes.size() > 0) {
-                      homeApplication.getHomeFrame(homes.get(0)).toFront();
-                      defaultFrame.setVisible(false);
-                    }
-                  }
-                }
-              });
-          }
-          homeFrame.addWindowStateListener(new WindowStateListener() {
-              public void windowStateChanged(WindowEvent ev) {
-                // Enable default actions if needed
-                enableDefaultActions(homeApplication, defaultHomeView);
-              }
-            });
-          // Don't enable actions in default menu bar (the menu bar might be displayed when file dialogs are displayed)
-          setDefaultActionsEnabled(defaultHomeView, false);
-        } else if (ev.getType() == CollectionEvent.Type.DELETE) {
-          // Enable default actions if needed
-          enableDefaultActions(homeApplication, defaultHomeView);
-        }
-      };
-    });
-
-    // Set application icon if program wasn't launch from bundle
-    if (!Boolean.getBoolean("sweethome3d.bundle")) {
-      try {
-        String iconPath = homeApplication.getUserPreferences().getLocalizedString(HomePane.class, "about.icon");
-        Image icon = ImageIO.read(HomePane.class.getResource(iconPath));
-        macosxApplication.setDockIconImage(icon);
-      } catch (NoSuchMethodError ex) {
-        // Ignore icon change if setDockIconImage isn't available
-      } catch (IOException ex) {
-      }
-    }
-  }
-
-  /**
-   * Handles quit action.
-   */
-  private static void handleQuit(final SweetHome3D homeApplication,
-                                 final HomeController defaultController,
-                                 final JFrame defaultFrame) {
-    Home modifiedHome = null;
-    int modifiedHomesCount = 0;
-    for (Home home : homeApplication.getHomes()) {
-      if (home.isModified()) {
-        modifiedHome = home;
-        modifiedHomesCount++;
-      }
-    }
-
-    if (modifiedHomesCount == 1) {
-      // If only one home is modified, close it and exit if it was successfully closed
-      homeApplication.getHomeFrame(modifiedHome).toFront();
-      homeApplication.getHomeFrameController(modifiedHome).getHomeController().close(
-          new Runnable() {
-            public void run() {
-              for (Home home : homeApplication.getHomes()) {
-                if (home.isModified()) {
-                  return;
-                }
-              }
-              System.exit(0);
-            }
-          });
-    } else {
-      handleApplicationMenuAction(new Runnable() {
-          public void run() {
-            getActiveHomeController(homeApplication, defaultController, defaultFrame).exit();
-          }
-        }, defaultFrame);
-      if (homeApplication.getHomes().isEmpty()) {
-        System.exit(0);
-      }
-    }
-  }
-
-  /**
-   * Handles how about pane is displayed.
-   */
-  protected static void handleAbout(final SweetHome3D homeApplication,
-                                    final HomeController defaultController,
-                                    final JFrame defaultFrame) {
-      handleApplicationMenuAction(new Runnable() {
-          public void run() {
-            getActiveHomeController(homeApplication, defaultController, defaultFrame).about();
-          }
-        }, defaultFrame);
-  }
-
-  /**
-   * Handles how preferences pane is displayed.
-   */
-  private static void handlePreferences(final SweetHome3D homeApplication,
-                                        final HomeController defaultController,
-                                        final JFrame defaultFrame) {
-    handleApplicationMenuAction(new Runnable() {
-        public void run() {
-          getActiveHomeController(homeApplication, defaultController, defaultFrame).editPreferences();
-        }
-      }, defaultFrame);
-  }
-
-  /**
-   * Handles the opening of a document.
-   */
-  private static void handleOpenFile(final SweetHome3D homeApplication, String fileName) {
-    homeApplication.start(new String [] {"-open", fileName});
-  }
-
-  /**
-   * Handles application when it's reopened.
-   */
-  private static void handleReOpenApplication(SweetHome3D homeApplication) {
-    homeApplication.start(new String [0]);
-  }
-
-  /**
-   * Handles actions launched from the application menu.
-   */
-  private static void handleApplicationMenuAction(Runnable runnable, JFrame defaultFrame) {
-    final Application macosxApplication = Application.getApplication();
-    Frame activeFrame = getActiveFrame(defaultFrame);
-    if (defaultFrame != null && activeFrame == null) {
-      // Move default frame to center to display dialogs at center
-      defaultFrame.setLocationRelativeTo(null);
-      defaultFrame.toFront();
-      defaultFrame.setAlwaysOnTop(true);
-    }
-
-    try {
-      // Disable About and Preferences menu items if possible
-      macosxApplication.setEnabledAboutMenu(false);
-      macosxApplication.setEnabledPreferencesMenu(false);
-    } catch (NoSuchMethodError ex) {
-    }
-
-    runnable.run();
-
-    try {
-      // Enable About and Preferences menu items again
-      macosxApplication.setEnabledAboutMenu(true);
-      macosxApplication.setEnabledPreferencesMenu(true);
-    } catch (NoSuchMethodError ex) {
-    }
-
-    // Activate previous frame again
-    if (activeFrame != null) {
-      activeFrame.toFront();
-    }
-    if (defaultFrame != null && activeFrame == null) {
-      defaultFrame.setAlwaysOnTop(false);
-      // Move default frame out of user view
-      defaultFrame.toBack();
-      defaultFrame.setLocation(-10, 0);
-    }
-  }
-
-  /**
-   * Returns the home controller that manages the active frame.
-   */
-  private static HomeController getActiveHomeController(SweetHome3D homeApplication,
-                                                        HomeController defaultController,
-                                                        JFrame defaultFrame) {
-    if (defaultFrame != null) {
-      Frame activeFrame = getActiveFrame(defaultFrame);
-      if (activeFrame != null) {
-        for (Home home : homeApplication.getHomes()) {
-          if (homeApplication.getHomeFrame(home) == activeFrame) {
-            return homeApplication.getHomeFrameController(home).getHomeController();
-          }
-        }
-      }
-    }
-    return defaultController;
-  }
-
-  /**
-   * Returns the active frame.
-   */
-  private static Frame getActiveFrame(JFrame defaultFrame) {
-    Frame activeFrame = null;
-    for (Frame frame : Frame.getFrames()) {
-      if (frame != defaultFrame && frame.isActive()) {
-        activeFrame = frame;
-        break;
-      }
-    }
-    return activeFrame;
-  }
-
-  /**
-   * Enables default menu bar actions if no window is at screen.
-   */
-  private static void enableDefaultActions(SweetHome3D homeApplication, HomePane defaultHomeView) {
-    for (Home home : homeApplication.getHomes()) {
-      if ((homeApplication.getHomeFrame(home).getState() & JFrame.ICONIFIED) == 0) {
-        setDefaultActionsEnabled(defaultHomeView, false);
-        return;
-      }
-    }
-    // If all homes are iconified, enable actions in default menu bar
-    setDefaultActionsEnabled(defaultHomeView, true);
-  }
-
-  /**
-   * Enables / disables default actions in the given view.
-   */
-  private static void setDefaultActionsEnabled(HomePane homeView, boolean enabled) {
-    for (HomePane.ActionType action : HomePane.ActionType.values()) {
-      switch (action) {
-        case ABOUT :
-        case NEW_HOME :
-        case NEW_HOME_FROM_EXAMPLE :
-        case OPEN :
-        case DELETE_RECENT_HOMES :
-        case HELP :
-          homeView.setEnabled(action, enabled);
-          break;
-        default :
-          homeView.setEnabled(action, false);
-      }
-    }
-  }
-
-  /**
-   * Returns a dummy frame used to display the default menu bar.
-   */
-  private static JFrame createDummyFrameWithDefaultMenuBar(final SweetHome3D homeApplication,
-                                                           final HomePane defaultHomeView,
-                                                           final JMenuBar defaultMenuBar) {
-    final JFrame frame = new JFrame();
-    EventQueue.invokeLater(new Runnable() {
-        public void run() {
-          // Create a default undecorated frame out of sight
-          // and attach the application menu bar of empty view to it
-          frame.setLocation(-10, 0);
-          frame.setUndecorated(true);
-          frame.setBackground(new Color(0, 0, 0, 0));
-          frame.setVisible(true);
-          frame.setJMenuBar(defaultMenuBar);
-          frame.setContentPane(defaultHomeView);
-          addWindowMenu(frame, defaultMenuBar, homeApplication, defaultHomeView, null);
-        }
-      });
-    homeApplication.addHomesListener(new CollectionListener<Home>() {
-        public void collectionChanged(CollectionEvent<Home> ev) {
-          if (ev.getType() == CollectionEvent.Type.DELETE) {
-            EventQueue.invokeLater(new Runnable() {
-                public void run() {
-                  if (frame.isActive()) {
-                    List<Home> homes = homeApplication.getHomes();
-                    if (homes.size() >= 1) {
-                      // Request focus in a remaining home if the dummy frame is active
-                      homeApplication.getHomeFrame(homes.get(homes.size() - 1)).requestFocus();
-                    }
-                  }
-                }
-              });
-          }
-        }
-      });
-    return frame;
-  }
-
-  /**
-   * Adds Mac OS X standard Window menu to frame.
-   */
-  private static void addWindowMenu(final JFrame frame,
-                                    final JMenuBar menuBar,
-                                    final SweetHome3D homeApplication,
-                                    final HomePane defaultHomeView,
-                                    final Home home) {
-    UserPreferences preferences = homeApplication.getUserPreferences();
-    final JMenu windowMenu = new JMenu(
-        new ResourceAction(preferences, MacOSXConfiguration.class, "WINDOW_MENU", true));
-    final boolean enabledMenuItem = home != null;
-    // Add Window menu before Help menu
-    menuBar.add(windowMenu, menuBar.getComponentCount() - 1);
-    windowMenu.add(new JMenuItem(
-        new ResourceAction(preferences, MacOSXConfiguration.class, "MINIMIZE", enabledMenuItem) {
-            @Override
-            public void actionPerformed(ActionEvent ev) {
-              frame.setState(JFrame.ICONIFIED);
-            }
-          }));
-    windowMenu.add(new JMenuItem(
-        new ResourceAction(preferences, MacOSXConfiguration.class, "ZOOM", enabledMenuItem) {
-            @Override
-            public void actionPerformed(ActionEvent ev) {
-              if ((frame.getExtendedState() & JFrame.MAXIMIZED_BOTH) != 0) {
-                frame.setExtendedState(frame.getExtendedState() & ~JFrame.MAXIMIZED_BOTH);
-              } else {
-                frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
-              }
-            }
-          }));
-    windowMenu.addSeparator();
-    windowMenu.add(new JMenuItem(
-        new ResourceAction(preferences, MacOSXConfiguration.class, "BRING_ALL_TO_FRONT", enabledMenuItem) {
-            @Override
-            public void actionPerformed(ActionEvent ev) {
-              // Avoid blinking while bringing other windows to front
-              frame.setAlwaysOnTop(true);
-              for (Home home : homeApplication.getHomes()) {
-                JFrame applicationFrame = homeApplication.getHomeFrame(home);
-                if (applicationFrame != frame
-                    && applicationFrame.getState() != JFrame.ICONIFIED) {
-                  applicationFrame.setFocusableWindowState(false);
-                  applicationFrame.toFront();
-                  applicationFrame.setFocusableWindowState(true);
-                }
-              }
-              frame.setAlwaysOnTop(false);
-            }
-          }));
-
-    // Prepare window menu items and their action
-    // It would be nicer to dynamically add these menu items when the Window menu is selected
-    // but a regression in Java 8u152 prevented to listen to dynamic menu items
-    final int alwaysVisibleItemsCount = windowMenu.getMenuComponentCount();
-    windowMenu.addSeparator();
-    List<Home> homes = homeApplication.getHomes();
-    for (int i = 0; i < homes.size(); i++) {
-      windowMenu.add(createWindowCheckBoxMenuItem(homeApplication, i));
-    }
-    homeApplication.addHomesListener(new CollectionListener<Home>() {
-        public void collectionChanged(CollectionEvent<Home> ev) {
-          switch (ev.getType()) {
-            case ADD :
-              windowMenu.add(createWindowCheckBoxMenuItem(homeApplication, homeApplication.getHomes().size() - 1));
-              break;
-            case DELETE :
-              windowMenu.remove(windowMenu.getMenuComponentCount() - 1);
-              if (home == ev.getItem()) {
-                homeApplication.removeHomesListener(this);
-              }
-              break;
-          }
-        }
-      });
-
-    windowMenu.addMenuListener(new MenuListener() {
-        public void menuSelected(MenuEvent ev) {
-          // Update menu dynamically with a visible menu item for the frame of each application home
-          List<Home> homes = homeApplication.getHomes();
-          // Show separator and menu items with home names
-          windowMenu.getMenuComponent(alwaysVisibleItemsCount).setVisible(homes.size() > 0);
-          for (int i = alwaysVisibleItemsCount + 1, index = 0; i < windowMenu.getMenuComponentCount(); i++, index++) {
-            JCheckBoxMenuItem windowMenuItem =  (JCheckBoxMenuItem)windowMenu.getMenuComponent(i);
-            JFrame applicationFrame = homeApplication.getHomeFrame(homes.get(index));
-            windowMenuItem.setText(applicationFrame.getTitle());
-            windowMenuItem.setSelected(frame == applicationFrame);
-          }
-        }
-
-        public void menuDeselected(MenuEvent ev) {
-        }
-
-        public void menuCanceled(MenuEvent ev) {
-        }
-      });
-  }
-
-  /**
-   * Returns a check box menu item which action will bring to front the home at the given <code>index</code>.
-   */
-  private static JCheckBoxMenuItem createWindowCheckBoxMenuItem(final SweetHome3D homeApplication, final int index) {
-    return new JCheckBoxMenuItem(new AbstractAction() {
-        public void actionPerformed(ActionEvent ev) {
-          homeApplication.getHomeFrame(homeApplication.getHomes().get(index)).toFront();
-        }
-      });
-  }
-
-  /**
-   * Updates pane tool bar to integrate it with frame title under Mac OS X.
-   */
-  public static void installToolBar(final JRootPane rootPane) {
-    List<JToolBar> toolBars = SwingTools.findChildren(rootPane, JToolBar.class);
-    if (toolBars.size() == 1) {
-      final JToolBar toolBar = toolBars.get(0);
-      // Bars used to manage floating system under Java 6, and gradient rendering of the tool bar
-      // forbids to use the floating system under further Java versions
-      toolBar.setFloatable(toolBar.isFloatable() && toolBar.getComponentOrientation().isLeftToRight());
-      if (OperatingSystem.isJavaVersionGreaterOrEqual("1.7.0_12")) {
-        toolBar.setFloatable(false);
-        rootPane.putClientProperty("apple.awt.brushMetalLook", true);
-        toolBar.setBorder(new AbstractBorder() {
-            private final Color TOP_GRADIENT_COLOR_ACTIVATED_FRAME = OperatingSystem.isMacOSXYosemiteOrSuperior()
-                ? new Color(212, 212, 212)
-                : new Color(222, 222, 222);
-            private final Color BOTTOM_GRADIENT_COLOR_ACTIVATED_FRAME = OperatingSystem.isMacOSXYosemiteOrSuperior()
-                ? new Color(209, 209, 209)
-                : new Color(178, 178, 178);
-            private final Color TOP_GRADIENT_COLOR_DEACTIVATED_FRAME  = new Color(244, 244, 244);
-            private final Color BOTTOM_GRADIENT_COLOR_DEACTIVATED_FRAME = TOP_GRADIENT_COLOR_ACTIVATED_FRAME;
-
-            @Override
-            public boolean isBorderOpaque() {
-              return true;
-            }
-
-            @Override
-            public Insets getBorderInsets(Component c) {
-              return new Insets(-4, 4, 0, 4);
-            }
-
-            @Override
-            public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-              // Paint the tool bar with a gradient different if the frame is activated or not
-              Component root = SwingUtilities.getRoot(rootPane);
-              boolean active = ((JFrame)root).isActive();
-              ((Graphics2D)g).setPaint(new GradientPaint(0, y,
-                  active ? TOP_GRADIENT_COLOR_ACTIVATED_FRAME : TOP_GRADIENT_COLOR_DEACTIVATED_FRAME,
-                  0, y + height - 1,
-                  active ? BOTTOM_GRADIENT_COLOR_ACTIVATED_FRAME : BOTTOM_GRADIENT_COLOR_DEACTIVATED_FRAME));
-              g.fillRect(x, y, x + width, y + height);
-            }
-          });
-
-        // Manage frame moves when the user clicks in the tool bar background
-        final MouseInputAdapter mouseListener = new MouseInputAdapter() {
-            private Point lastLocation;
-
-            @Override
-            public void mousePressed(MouseEvent ev) {
-              this.lastLocation = ev.getPoint();
-              SwingUtilities.convertPointToScreen(this.lastLocation, ev.getComponent());
-            }
-
-            @Override
-            public void mouseDragged(MouseEvent ev) {
-              Point newLocation = ev.getPoint();
-              SwingUtilities.convertPointToScreen(newLocation, ev.getComponent());
-              Component root = SwingUtilities.getRoot(rootPane);
-              root.setLocation(root.getX() + newLocation.x - this.lastLocation.x,
-                  root.getY() + newLocation.y - this.lastLocation.y);
-              this.lastLocation = newLocation;
-            }
-          };
-        toolBar.addMouseListener(mouseListener);
-        toolBar.addMouseMotionListener(mouseListener);
-
-        toolBar.addAncestorListener(new AncestorListener() {
-            private Object fullScreenListener;
-
-            public void ancestorAdded(AncestorEvent ev) {
-              ((Window)SwingUtilities.getRoot(toolBar)).addWindowListener(new WindowAdapter() {
-                  @Override
-                  public void windowActivated(WindowEvent ev) {
-                    toolBar.repaint();
-                  }
-
-                  @Override
-                  public void windowDeactivated(WindowEvent ev) {
-                    toolBar.repaint();
-                  }
-                });
-              toolBar.repaint();
-
-              try {
-                Class fullScreenUtilitiesClass = Class.forName("com.apple.eawt.FullScreenUtilities");
-                this.fullScreenListener = new FullScreenAdapter() {
-                    public void windowEnteredFullScreen(FullScreenEvent ev) {
-                      fullScreen = true;
-                      toolBar.removeMouseListener(mouseListener);
-                      toolBar.removeMouseMotionListener(mouseListener);
-                    }
-
-                    public void windowExitedFullScreen(FullScreenEvent ev) {
-                      fullScreen = false;
-                      toolBar.addMouseListener(mouseListener);
-                      toolBar.addMouseMotionListener(mouseListener);
-                    }
-                  };
-                FullScreenUtilities.addFullScreenListenerTo((Window)SwingUtilities.getRoot(rootPane),
-                    (FullScreenListener)this.fullScreenListener);
-              } catch (ClassNotFoundException ex) {
-                // If FullScreenUtilities isn't supported, ignore mouse listener switch
-              }
-            }
-
-            public void ancestorMoved(AncestorEvent ev) {
-            }
-
-            public void ancestorRemoved(AncestorEvent ev) {
-              toolBar.removeAncestorListener(this);
-              try {
-                Class fullScreenUtilitiesClass = Class.forName("com.apple.eawt.FullScreenUtilities");
-                FullScreenUtilities.removeFullScreenListenerFrom((Window)SwingUtilities.getRoot(rootPane),
-                    (FullScreenListener)this.fullScreenListener);
-              } catch (ClassNotFoundException ex) {
-                // If FullScreenUtilities isn't supported, ignore mouse listener switch
-              }
-            }
-          });
-
-        // Empty left, bottom and right borders of sibling split pane
-        List<JSplitPane> siblings = SwingTools.findChildren((JComponent)toolBar.getParent(), JSplitPane.class);
-        if (siblings.size() >= 1) {
-          JComponent siblingComponent = siblings.get(0);
-          if (siblingComponent.getParent() == toolBar.getParent()) {
-            Border border = siblingComponent.getBorder();
-            final Insets borderInsets = border.getBorderInsets(siblingComponent);
-            final Insets filledBorderInsets = new Insets(1, 0, 0, 0);
-            siblingComponent.setBorder(new CompoundBorder(border,
-                new AbstractBorder() {
-                  @Override
-                  public Insets getBorderInsets(Component c) {
-                    return filledBorderInsets;
-                  }
-
-                  @Override
-                  public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-                    Color background = c.getBackground();
-                    g.setColor(background);
-                    g.fillRect(x, y, width, 1);
-                    g.fillRect(x - borderInsets.left, y, borderInsets.left, height + borderInsets.bottom);
-                    g.fillRect(x + width, y, borderInsets.right, height + borderInsets.bottom);
-                    g.fillRect(x, y + height, width, borderInsets.bottom);
-                  }
-                }));
-          }
-        }
-      }
-    }
-  }
-
-  /**
-   * Returns <code>true</code> if the given window is displayed in full screen mode.
-   */
-  public static boolean isWindowFullScreen(final JFrame frame) {
-    return fullScreen;
-  }
-
-  /**
-   * Listener for Mac OS X application events.
-   * Declared in a separated static class and instantiated by reflection to be able to run Sweet Home 3D with Java 10.
-   */
-  private static class MacOSXApplicationListener extends ApplicationAdapter {
-    private final JFrame         defaultFrame;
-    private final SweetHome3D    homeApplication;
-    private final HomeController defaultController;
-
-    public MacOSXApplicationListener(SweetHome3D homeApplication, HomeController defaultController, JFrame defaultFrame) {
-      this.defaultFrame = defaultFrame;
-      this.homeApplication = homeApplication;
-      this.defaultController = defaultController;
-    }
-
-    @Override
-    public void handleQuit(ApplicationEvent ev) {
-      MacOSXConfiguration.handleQuit(this.homeApplication, this.defaultController, this.defaultFrame);
-    }
-
-    @Override
-    public void handleAbout(ApplicationEvent ev) {
-      MacOSXConfiguration.handleAbout(this.homeApplication, this.defaultController, this.defaultFrame);
-      ev.setHandled(true);
-    }
-
-    @Override
-    public void handlePreferences(ApplicationEvent ev) {
-      MacOSXConfiguration.handlePreferences(this.homeApplication, this.defaultController, this.defaultFrame);
-    }
-
-    @Override
-    public void handleOpenFile(ApplicationEvent ev) {
-      // handleOpenFile is called when user opens a document
-      // associated with a Java Web Start application
-      // Just call main with -open file arguments as JNLP specifies
-      MacOSXConfiguration.handleOpenFile(this.homeApplication, ev.getFilename());
-    }
-
-    @Override
-    public void handleReOpenApplication(ApplicationEvent ev) {
-      // handleReOpenApplication is called when user launches
-      // the application when it's already open
-      MacOSXConfiguration.handleReOpenApplication(this.homeApplication);
-    }
-  }
-}
diff --git a/src/com/eteks/sweethome3d/SweetHome3D.java b/src/com/eteks/sweethome3d/SweetHome3D.java
index 0059285..7b088fe 100644
--- a/src/com/eteks/sweethome3d/SweetHome3D.java
+++ b/src/com/eteks/sweethome3d/SweetHome3D.java
@@ -486,7 +486,7 @@ public class SweetHome3D extends HomeApplication {
     }
     if (OperatingSystem.isMacOSX()) {
       // Bind to application menu at last
-      MacOSXConfiguration.bindToApplicationMenu(this);
+      //MacOSXConfiguration.bindToApplicationMenu(this);
     }
 
     // Run everything else in Event Dispatch Thread
@@ -521,13 +521,13 @@ public class SweetHome3D extends HomeApplication {
       if (System.getProperty("apple.awt.application.name") == null) {
         System.setProperty("apple.awt.application.name", applicationName);
       }
-      if (System.getProperty("apple.laf.useScreenMenuBar") == null) {
+      /*if (System.getProperty("apple.laf.useScreenMenuBar") == null) {
         // Use Mac OS X screen menu bar for frames menu bar
         // except for bundles under macOS 10.13
         System.setProperty("apple.laf.useScreenMenuBar", 
             String.valueOf(OperatingSystem.compareVersions(System.getProperty("os.version"), "10.13") < 0
                 || MacOSXConfiguration.isScreenMenuBarSupported()));
-      }
+      }*/
       // Force the use of Quartz under Mac OS X for better Java 2D rendering performance
       System.setProperty("apple.awt.graphics.UseQuartz", "true");
       if (System.getProperty("com.eteks.sweethome3d.dragAndDropWithoutTransferHandler") == null
@@ -602,8 +602,7 @@ public class SweetHome3D extends HomeApplication {
                 && home.getName() == null
                 && !home.isRecovered()) {
               if (OperatingSystem.isMacOSXLionOrSuperior()
-                  && OperatingSystem.isJavaVersionGreaterOrEqual("1.7")
-                  && MacOSXConfiguration.isWindowFullScreen(getHomeFrame(home))) {
+                  && OperatingSystem.isJavaVersionGreaterOrEqual("1.7")) {
                 // Delay home disposal to avoid Java 3D fatal error
                 new Timer(3000, new ActionListener() {
                     public void actionPerformed(ActionEvent ev) {
diff --git a/src/com/eteks/sweethome3d/tools/OperatingSystem.java b/src/com/eteks/sweethome3d/tools/OperatingSystem.java
index 1d65707..5a90e0b 100644
--- a/src/com/eteks/sweethome3d/tools/OperatingSystem.java
+++ b/src/com/eteks/sweethome3d/tools/OperatingSystem.java
@@ -33,7 +33,6 @@ import java.util.Timer;
 import java.util.TimerTask;
 import java.util.UUID;
 
-import com.apple.eio.FileManager;
 import com.eteks.sweethome3d.model.Home;
 
 /**
@@ -443,9 +442,9 @@ public class OperatingSystem {
    */
   public static File getDefaultApplicationFolder() throws IOException {
     File userApplicationFolder; 
-    if (isMacOSX()) {
+    /*if (isMacOSX()) {
       userApplicationFolder = new File(MacOSXFileManager.getApplicationSupportFolder());
-    } else if (isWindows()) {
+    }*/if (isWindows()) {
       userApplicationFolder = new File(System.getProperty("user.home"), "Application Data");
       // If user Application Data directory doesn't exist, use user home
       if (!userApplicationFolder.exists()) {
@@ -466,10 +465,10 @@ public class OperatingSystem {
    * This class requires some classes of <code>com.apple.eio</code> package  
    * to compile.
    */
-  private static class MacOSXFileManager {
+  /*private static class MacOSXFileManager {
     public static String getApplicationSupportFolder() throws IOException {
       // Find application support folder (0x61737570) for user domain (-32763)
       return FileManager.findFolder((short)-32763, 0x61737570);
     }
-  }
+  }*/
 }