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.
Summary: | Focus is lost when hierarchy event listener is add to Toolkit | ||
---|---|---|---|
Product: | platform | Reporter: | Jiri Skrivanek <jskrivanek> |
Component: | Window System | Assignee: | Peter Zavadsky <pzavadsky> |
Status: | CLOSED WORKSFORME | ||
Severity: | blocker | CC: | mgrummich, mmirilovic, mslama, thurka |
Priority: | P3 | Keywords: | T9Y |
Version: | 3.x | ||
Hardware: | Sun | ||
OS: | SunOS | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Test case |
Description
Jiri Skrivanek
2003-02-03 14:18:21 UTC
Created attachment 8765 [details]
Test case
This is really mess caused by adding componentShowing(). -> to make sure component is visible there is a bunch of TopComponent.setVisible(false/true) from our focus event dispatcher. Call of setVisible() causes creating another focus event from processing of previous one - it is really ugly practice. Fix of this issue is relatively easy: Just do not call TopComponent.setVisible(true) from SplitContainerImpl.componentSelected(). But this fixed issue #24485. It is magic circle. I spent already 2 days on investigation but still no idea why adding another listener to Toolkit causes this change of behaviour. Perhaps it could be that setVisible() also generates hierarchy events. Current Winsys API is not suitable for componentShowing() approach when we want to initialize only GUI of TopComponent added in the end. Current implementation calls TopComponent.setVisible() everywhere just to be sure that proper TopComponent is/is not visible. Winsys redesign should solve this but I do not what solution shoudl be aplied now. Peter any idea? Actually focus is not lost it is assigned to toolbar of visible top component in Editor. I removed fix of #24422, #24485. These issues are not reproducible for me when I removed original fix. Please Marian can you verify on Solaris? This issue is fixed too by removing of above fixes. If there will be problem with component visibility we will have to find some other solution. I tested on JDK 1.4.1_01. Modified: core/src/org/netbeans/core/windows/frames/SplitContainerImpl.java r.1.98 Verified in 20030206-0100. Thanks. The fix was reverted, because it has caused regression of issue #24422, see issue #31427. Btw. why is this P2? Decreasing it doesn't correspond to the guide which explains which kind of issues are P2's It is P2 when we apply a rule "product feature"="testability": P2 * product feature is significantly affected, a workaround may exist bug is difficult to use or impractical * intermittent crash or deadlock, happens fairly often * critical usability problem * severe performance problem * affects another developer's progress Please, fix ASAP. Well now it seems to be working, also Jiri confirmed it. So there had to be made some change between Marek commit and my rollback which in fact made the difference. Closing as worksforme. Verified in build 200302260100. |