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.

Bug 50372

Summary: clicking the titlebar of slide-in window should give the window focus
Product: platform Reporter: athompson <athompson>
Component: Window SystemAssignee: Stanislav Aubrecht <saubrecht>
Status: CLOSED FIXED    
Severity: blocker CC: mkleint
Priority: P4 Keywords: FOCUS
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description athompson 2004-10-13 17:13:43 UTC
jdk-1.5
linux-gtk2
CVS 10/13/2004

'nuff said; should be trivial to implement.
Comment 1 athompson 2005-03-02 16:17:51 UTC
actually this is a defect since it's expected UI behavior, but not a p3.
Comment 2 Milos Kleint 2005-04-22 08:54:59 UTC
reassigning
Comment 3 Milos Kleint 2005-11-16 13:47:13 UTC
reassigning -> sabrecht
Comment 4 Stanislav Aubrecht 2005-11-22 17:15:39 UTC
milos, pls review the fix (i'd rather be careful when dealing with focus issues...)

Index: AbstractViewTabDisplayerUI.java
***
D:\projects\nb\core\swing\tabcontrol\src\org\netbeans\swing\tabcontrol\plaf\AbstractViewTabDisplayerUI.java
Base (1.26)
---
D:\projects\nb\core\swing\tabcontrol\src\org\netbeans\swing\tabcontrol\plaf\AbstractViewTabDisplayerUI.java
Locally Modified (Based On 1.26)
***************
***************
*** 639,640 ****
--- 637,647 ----
                  if (change) {
                      getSelectionModel().setSelectedIndex(i);
                      tabState.setSelected(i);
+                     TopComponent tc =
(TopComponent)getDataModel().getTab(i).getComponent();
+                     if( null != tc 
+                         && !tc.isAncestorOf(
KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner() ) ) {
+                         tc.requestActive();
+                     }
                  }
              } 
              // update pressed state
Comment 5 Stanislav Aubrecht 2005-11-23 15:35:45 UTC
fixed

Checking in AbstractViewTabDisplayerUI.java;
/cvs/core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/AbstractViewTabDisplayerUI.java,v
 <--  AbstractViewTabDisplayerUI.java
new revision: 1.27; previous revision: 1.26
done
Checking in AquaViewTabDisplayerUI.java;
/cvs/core/swing/tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/AquaViewTabDisplayerUI.java,v
 <--  AquaViewTabDisplayerUI.java
new revision: 1.22; previous revision: 1.21
done
Comment 6 Zdenek Konecny 2005-12-12 14:08:18 UTC
verified, build 200512111900