This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 198639
Collapse All | Expand All

(-)a/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java (+18 lines)
Lines 58-63 Link Here
58
import java.awt.Rectangle;
58
import java.awt.Rectangle;
59
import java.awt.event.*;
59
import java.awt.event.*;
60
import java.io.File;
60
import java.io.File;
61
import java.lang.reflect.Field;
61
import java.util.*;
62
import java.util.*;
62
import java.util.logging.Level;
63
import java.util.logging.Level;
63
import java.util.logging.Logger;
64
import java.util.logging.Logger;
Lines 139-144 Link Here
139
       if (mainMenuBar == null) {
140
       if (mainMenuBar == null) {
140
           mainMenuBar = createMenuBar();
141
           mainMenuBar = createMenuBar();
141
           ToolbarPool.getDefault().waitFinished();
142
           ToolbarPool.getDefault().waitFinished();
143
           if ("gnome-shell".equals(System.getenv("DESKTOP_SESSION"))) {
144
               try {
145
                   Class<?> xwm = Class.forName("sun.awt.X11.XWM");
146
                   Field awt_wmgr = xwm.getDeclaredField("awt_wmgr");
147
                   awt_wmgr.setAccessible(true);
148
                   Field other_wm = xwm.getDeclaredField("OTHER_WM");
149
                   other_wm.setAccessible(true);
150
                   if (awt_wmgr.get(null).equals(other_wm.get(null))) {
151
                       Field metacity_wm = xwm.getDeclaredField("METACITY_WM");
152
                       metacity_wm.setAccessible(true);
153
                       awt_wmgr.set(null, metacity_wm.get(null));
154
                       LOGGER.info("installed #198639 workaround");
155
                   }
156
               } catch (Exception x) {
157
                   LOGGER.log(Level.FINE, null, x);
158
               }
159
           }
142
       }
160
       }
143
   }
161
   }
144
162

Return to bug 198639