[josm-dev] [BROKEN PATCH] Adding a Full Screen action to the View menu

Ævar Arnfjörð Bjarmason avarab at gmail.com
Thu Mar 5 19:12:34 GMT 2009


On Wed, Mar 4, 2009 at 10:27 PM, Ævar Arnfjörð Bjarmason
<avarab at gmail.com> wrote:
> I tried adding a full screen action to josm, see the attached patch.
>
> This works if only the main window is displayed, however when JOSM
> opens another dialog (e.g. the download dialog), the OS's gui elements
> pop over the main window.
>
> Is there anything special one has to do in awt to make child windows
> respect the full screen configuration?

Actually this is less broken than I thought, it works on Linux but may
not work perfectly depending on the Window Manager, this isn't
anything specific to JOSM though. On my box Firefox and Rhythmbox for
example exhibit the same behavior:

http://flickr.com/photos/avarab/3330748992/
http://flickr.com/photos/avarab/3330749160/

However on Windows and Mac OS X it takes a turn for the worse,
according to tedm@#osm which was kind enough to test it F11 on Windows
will cause JOSM to cover the task bar, but the window decorations will
still remain.

Presumably this can be solved with frame.setUndecorated(true), however
the setUndecorated method can only be called on a frame before it's
displayed in the first place, so I don't know how to do this other
than shutting down the main frame and starting it again on F11, which
would of course lose any state in it at the time.

On OSX it's even worse: "clicking fullscreen in your josm, the window
stayed the same size, everything around it was replaced with black,
and the menu stayed open and wouldn't close right [...] the app
becomes completely unresponsive [...] only thing i can do is close it
with the window manager close button". All this despite
gd.isFullScreenSupported() returning true on OSX.

Would a patch that only enabled this feature under X11 be acceptable?
Or perhaps some win32/OSX hacker can take a look at it.




More information about the josm-dev mailing list