Modify

Opened 3 years ago

Closed 3 years ago

#5463 closed enhancement (fixed)

[patch] get rid of window decorations in fullscreen mode

Reported by: Christian Müller <cmue81@…> Owned by: team
Priority: normal Component: Core
Version: Keywords: fullscreen window decoration F11
Cc:

Description

this patch is especially helpful if you want to use josm on a netbook to have more screen real estate

tested with Windows XP, but the code is pure java / platform independent..

the previous behavior when going to fullscreen was identical to using the maximize button (from a user perspective)

have a nice day,
christian

Attachments (2)

FullscreenToggleAction.java.patch (1.5 KB) - added by Christian Müller <cmue81@…> 3 years ago.
have fullscreen mode use the full screen
FullscreenToggleAction.java.2.patch (1.4 KB) - added by Christian Müller <cmue81@…> 3 years ago.
use non-exclusive fullscreen mode in windows per default..

Download all attachments as: .zip

Change History (12)

Changed 3 years ago by Christian Müller <cmue81@…>

have fullscreen mode use the full screen

comment:1 follow-up: Changed 3 years ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

(In [3535]) applied #5463 (patch by Christian Müller) - get rid of window decorations in fullscreen mode

comment:2 in reply to: ↑ 1 Changed 3 years ago by Christian Müller <cmue81@…>

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to bastiK:

(In [3535]) applied #5463 (patch by Christian Müller) - get rid of window decorations in fullscreen mode

thanks for adding this so quick. unfortunately there is a problem, i just discovered. when popups open, josm gets minimized. this is a very obscure behavior - i don't know if it is just a windows xp problem or if it happens on unix as well, but in it's current form, some code is still missing to have it work nicely..

however, if u click josm in the taskbar to restore the window, everything is as it should be (josm is fullscreen and the respective popup shows up front). sorry for the inconvenience.. do you have an idea, how to fix it? you can trigger the behavior by downloading data (the jmapviewer opens and the app minimizes..)..

greetings

comment:3 Changed 3 years ago by bastiK

cannot reproduce the problem with ubuntu karmic

comment:4 follow-ups: Changed 3 years ago by bastiK

Hi,

for MS Windows, it seems to be impossible to display a JDialog on top of the main frame if it is in full screen exclusive mode.

http://stackoverflow.com/questions/1722922/jdialog-not-displaying-when-in-fullscreen-mode

However a "light" version of fullscreen is supposed to work:

        Frame frame = (Frame)Main.parent;
        java.awt.Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();

        frame. setBounds(0,0,dim.width, dim.height);
        frame.dispose();
        frame.setUndecorated(true);
        frame.setResizable(false);
        frame.setVisible(true);

Can you test and prepare a patch?

comment:5 in reply to: ↑ 4 Changed 3 years ago by Christian Müller <cmue81@…>

Replying to bastiK:

Hi,

for MS Windows, it seems to be impossible to display a JDialog on top of the main frame if it is in full screen exclusive mode.

yeah, it is.. the only way would be using internalframes with a jdesktoppane or jlayeredpane (the java solution to not create new (OS based) windows)..

if the window is undecorated it gets the whole screen by default, so the patch is simple - but you don't get the exclusive, accelerated mode (ok, in windowed mode I don't have this either, so I guess it's fine..)

Changed 3 years ago by Christian Müller <cmue81@…>

use non-exclusive fullscreen mode in windows per default..

comment:6 in reply to: ↑ 4 Changed 3 years ago by Christian Müller <cmue81@…>

ps: tested and works on my side (Windows XP)..

somebody with Vista or 7 should test it as well - maybe bounds or other stuff is needed there..

comment:7 Changed 3 years ago by bastiK

The bounds stuff is needed when you use simulated (non-exclusive) mode on gnome/linux.

comment:8 Changed 3 years ago by bastiK

(In [3537]) fix fullscreen by adding simulated mode for windows platorm (patch by Christian Müller) - see #5463 - get rid of window decorations in fullscreen mode

comment:9 Changed 3 years ago by bastiK

See #5470 for an issue i have with fullscreen.

comment:10 Changed 3 years ago by anonymous

  • Resolution set to fixed
  • Status changed from reopened to closed

i'll close this one and attach some cosmetic changes to #5470 ..

so the fullscreen issue are more or less solved (of course someone may also port whole of josm to use JDesktopPane or the docking frames framework to use that nitty exclusive mode on windows also, but what's the real gain? :-) )

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.