Ticket #5464: FullscreenToggleAction.java.patch

File FullscreenToggleAction.java.patch, 1.4 KB (added by cmuelle8, 15 years ago)

also closes 5465

  • src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

     
    1515
    1616import org.openstreetmap.josm.Main;
    1717import org.openstreetmap.josm.tools.PlatformHookUnixoid;
     18import org.openstreetmap.josm.tools.PlatformHookWindows;
    1819import org.openstreetmap.josm.tools.Shortcut;
    1920
    2021public class FullscreenToggleAction extends JosmAction {
     
    7273        Frame frame = (Frame)Main.parent;
    7374        frame.dispose();
    7475        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        }
    7686        frame.setVisible(true);
    7787    }
    7888