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 57376
Collapse All | Expand All

(-)core/windows/src/org/netbeans/core/windows/actions/RecentViewListAction.java (-3 / +1 lines)
Lines 58-64 Link Here
58
    public void actionPerformed(ActionEvent evt) {
58
    public void actionPerformed(ActionEvent evt) {
59
        TopComponent[] documents = getRecentDocuments();
59
        TopComponent[] documents = getRecentDocuments();
60
        
60
        
61
        if (documents.length == 0) {
61
        if (documents.length < 2) {
62
            return;
62
            return;
63
        }
63
        }
64
        
64
        
Lines 96-102 Link Here
96
            }
96
            }
97
        }
97
        }
98
        
98
        
99
        if(documents.length > 1) {
100
            TopComponent tc = documents[1];
99
            TopComponent tc = documents[1];
101
            // #37226 Unmaximized the other mode if needed.
100
            // #37226 Unmaximized the other mode if needed.
102
            WindowManagerImpl wm = WindowManagerImpl.getInstance();
101
            WindowManagerImpl wm = WindowManagerImpl.getInstance();
Lines 106-112 Link Here
106
            }
105
            }
107
            
106
            
108
            tc.requestActive();
107
            tc.requestActive();
109
        }
110
    }
108
    }
111
    
109
    
112
    private SwitcherTableItem[] createSwitcherItems(TopComponent[] tcs) {
110
    private SwitcherTableItem[] createSwitcherItems(TopComponent[] tcs) {
(-)core/windows/src/org/netbeans/core/windows/view/ui/KeyboardPopupSwitcher.java (+11 lines)
Lines 24-33 Link Here
24
import javax.swing.PopupFactory;
24
import javax.swing.PopupFactory;
25
import javax.swing.SwingUtilities;
25
import javax.swing.SwingUtilities;
26
import javax.swing.Timer;
26
import javax.swing.Timer;
27
import org.netbeans.core.IDESettings;
27
import org.netbeans.core.windows.actions.RecentViewListAction;
28
import org.netbeans.core.windows.actions.RecentViewListAction;
28
import org.netbeans.swing.popupswitcher.SwitcherTable;
29
import org.netbeans.swing.popupswitcher.SwitcherTable;
29
import org.netbeans.swing.popupswitcher.SwitcherTableItem;
30
import org.netbeans.swing.popupswitcher.SwitcherTableItem;
30
import org.openide.awt.StatusDisplayer;
31
import org.openide.awt.StatusDisplayer;
32
import org.openide.util.SharedClassObject;
31
import org.openide.util.Utilities;
33
import org.openide.util.Utilities;
32
import org.openide.windows.WindowManager;
34
import org.openide.windows.WindowManager;
33
35
Lines 93-103 Link Here
93
    /** Indicates whether an item to be selected is previous or next one. */
95
    /** Indicates whether an item to be selected is previous or next one. */
94
    private boolean fwd = true;
96
    private boolean fwd = true;
95
    
97
    
98
    /** Used to retrieve state about UI Mode */
99
    private static IDESettings settings =
100
            (IDESettings) SharedClassObject.findObject (IDESettings.class, true);
101
    
96
    /** 
102
    /** 
97
     * Tries to process given <code>KeyEvent</code> and returns true is event
103
     * Tries to process given <code>KeyEvent</code> and returns true is event
98
     * was successfully processed/consumed.
104
     * was successfully processed/consumed.
99
     */
105
     */
100
    public static boolean processShortcut(KeyEvent kev) {
106
    public static boolean processShortcut(KeyEvent kev) {
107
        // don't perform in MDI only when main window is not focused
108
        if (settings.getUIMode() == 2 &&
109
                !WindowManager.getDefault().getMainWindow().isFocused()) {
110
            return false;
111
        }
101
        boolean isCtrlTab = kev.getKeyCode() == KeyEvent.VK_TAB &&
112
        boolean isCtrlTab = kev.getKeyCode() == KeyEvent.VK_TAB &&
102
                kev.getModifiers() == InputEvent.CTRL_MASK;
113
                kev.getModifiers() == InputEvent.CTRL_MASK;
103
        boolean isCtrlShiftTab = kev.getKeyCode() == KeyEvent.VK_TAB &&
114
        boolean isCtrlShiftTab = kev.getKeyCode() == KeyEvent.VK_TAB &&

Return to bug 57376