Ticket #5464: FullscreenToggleAction.java.patch
| File FullscreenToggleAction.java.patch, 1.4 KB (added by , 15 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
15 15 16 16 import org.openstreetmap.josm.Main; 17 17 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 18 import org.openstreetmap.josm.tools.PlatformHookWindows; 18 19 import org.openstreetmap.josm.tools.Shortcut; 19 20 20 21 public class FullscreenToggleAction extends JosmAction { … … 72 73 Frame frame = (Frame)Main.parent; 73 74 frame.dispose(); 74 75 frame.setUndecorated(selected); 75 gd.setFullScreenWindow(selected ? frame : null); 76 if (!(Main.platform instanceof PlatformHookWindows)) { 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 gd.setFullScreenWindow(selected ? frame : null); 85 } 76 86 frame.setVisible(true); 77 87 } 78 88
