Changeset 3551 in josm
- Timestamp:
- 2010-09-20T00:15:35+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
r3543 r3551 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Dimension;7 6 import java.awt.Frame; 8 7 import java.awt.GraphicsDevice; … … 86 85 } 87 86 } 87 88 frame.dispose(); 89 frame.setUndecorated(selected); 90 91 if (selected) { 92 prevBounds = frame.getBounds(); 93 System.err.println(" get "+prevBounds); 94 frame.setBounds(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())); 95 } 88 96 89 97 // we cannot use hw-exclusive fullscreen mode in MS-Win, as long 90 // as josm throws out modal dialogs as well :-), see here:98 // as josm throws out modal dialogs, see here: 91 99 // http://forums.sun.com/thread.jspa?threadID=5351882 92 100 // … … 96 104 String exclusive = Main.pref.get("draw.fullscreen.exclusive-mode", "auto"); 97 105 if ("true".equals(exclusive) || ("auto".equals(exclusive) && !(Main.platform instanceof PlatformHookWindows))) { 98 frame.dispose();99 frame.setUndecorated(selected);100 106 gd.setFullScreenWindow(selected ? frame : null); 101 for (Window wind : visibleWindows) { 102 wind.setVisible(true); 103 } 104 } else { 105 frame.dispose(); 106 if (Main.pref.getBoolean("draw.fullscreen.set-screen-bounds", true) && selected) { 107 prevBounds = frame.getBounds(); 108 Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); 109 frame.setBounds(0, 0, dim.width, dim.height); 110 } else if (prevBounds != null) { 111 frame.setBounds(prevBounds); 112 } 113 frame.setUndecorated(selected); 114 for (Window wind : visibleWindows) { 115 wind.setVisible(true); 116 } 107 } 108 109 if (!selected && prevBounds != null) { 110 System.err.println(" set "+prevBounds); 111 frame.setBounds(prevBounds); 112 } 113 114 for (Window wind : visibleWindows) { 115 wind.setVisible(true); 117 116 } 118 117 }
Note:
See TracChangeset
for help on using the changeset viewer.