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 - clicking the titlebar of slide-in window should give the window focus
Summary: clicking the titlebar of slide-in window should give the window focus
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: FOCUS
Depends on:
Blocks:
 
Reported: 2004-10-13 17:13 UTC by athompson
Modified: 2008-12-22 17:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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