Changeset 1901 in josm for trunk/src


Ignore:
Timestamp:
2009-08-04T07:51:57+02:00 (15 years ago)
Author:
Gubaer
Message:

temporary fix for #3181: Dialogs causes JOSM window to be set as "always on top", preventing switchiong to other windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/OptionPaneUtil.java

    r1895 r1901  
    4242     */
    4343    static protected void prepareDialog(JDialog dialog) {
    44         try {
    45             dialog.setAlwaysOnTop(true);
    46         } catch(SecurityException e) {
    47             System.out.println(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString()));
     44
     45        // always on top can be disabled in a configuration option. This is necessary
     46        // for some WM on Linux, i.e. fluxbox. There, always-on-top propagates to the
     47        // parent window, i.e. the JOSM window itself.
     48        //
     49        // FIXME: this is a temporary solution. I'm still looking for an approach which
     50        // works across all OS and WMs. Can we get rid of "always-on-top" in JOSM
     51        // completely?
     52        //
     53        if (Main.pref.getBoolean("window-handling.option-pane-always-on-top", true)) {
     54            try {
     55                dialog.setAlwaysOnTop(true);
     56            } catch(SecurityException e) {
     57                System.out.println(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString()));
     58            }
    4859        }
    4960        dialog.setModal(true);
Note: See TracChangeset for help on using the changeset viewer.