Changeset 3537 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-09-18T09:48:41+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
r3535 r3537 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Dimension; 6 7 import java.awt.Frame; 7 8 import java.awt.GraphicsDevice; 8 9 import java.awt.GraphicsEnvironment; 10 import java.awt.Toolkit; 9 11 import java.awt.event.ActionEvent; 10 12 import java.awt.event.KeyEvent; … … 16 18 import org.openstreetmap.josm.Main; 17 19 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 20 import org.openstreetmap.josm.tools.PlatformHookWindows; 18 21 import org.openstreetmap.josm.tools.Shortcut; 19 22 … … 71 74 72 75 Frame frame = (Frame)Main.parent; 73 frame.dispose(); 74 frame.setUndecorated(selected); 75 gd.setFullScreenWindow(selected ? frame : null); 76 frame.setVisible(true); 76 77 // we cannot use hw-exclusive fullscreen mode in MS-Win, as long 78 // as josm throws out modal dialogs as well :-), see here: 79 // http://forums.sun.com/thread.jspa?threadID=5351882 80 // 81 // the good thing is: fullscreen works without exclusive mode, 82 // since windows (or java?) draws the undecorated window full- 83 // screen by default (it's a simulated mode, but should be ok) 84 String exclusive = Main.pref.get("draw.fullscreen.exclusive-mode", "auto"); 85 if ("yes".equals(exclusive) || ("auto".equals(exclusive) && !(Main.platform instanceof PlatformHookWindows))) { 86 frame.dispose(); 87 frame.setUndecorated(selected); 88 gd.setFullScreenWindow(selected ? frame : null); 89 frame.setVisible(true); 90 } else { 91 frame.dispose(); 92 if (Main.pref.getBoolean("draw.fullscreen.set-screen-bounds", true)) { 93 Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); 94 frame.setBounds(0, 0, dim.width, dim.height); 95 } 96 frame.setUndecorated(selected); 97 frame.setVisible(true); 98 } 77 99 } 78 100
Note:
See TracChangeset
for help on using the changeset viewer.