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 33940 - [SDI] List of windows in actual WS doesn't work
Summary: [SDI] List of windows in actual WS doesn't work
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords:
: 32716 33814 34935 35824 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-27 16:36 UTC by Marian Mirilovic
Modified: 2008-12-23 11:40 UTC (History)
4 users (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 Marian Mirilovic 2003-05-27 16:36:14 UTC
[s1s5](030521), [jdk1.4.1](02)

Steps to reproduce:
- run IDE in SDI mode
- open some java file
- push from main menu Window | Explorer
-> Explorer isn't focused neither radiobutton
isn't selected !
Comment 1 mslama 2003-06-04 12:50:40 UTC
This is part of more general focus transfer behaviour: In SDI native
frames are used. Simple call of requestFocus() does not guarantee that
focus is transferred between native windows (such problem is not
present in MDI). In current Window System API there is no way how to
transfer focus between native windows.

Here I must say: It works on Windows but it does NOT work on Linux.
(Not sure about Solaris now.)

In JDK API there is method Window.toFront() which is more agressive it
fronts window and focuses it (not always but at least more probably on
Linux). toFront() was used in TopFrameTypeImpl.setSelected() BUT it
breaks focus follows mouse behaviour: It fronted NB SDI windows as
mouse cursor was just moved over. So as fix of issue #31076 Peter
removed call of toFront() from setSelected(). BUT now focus transfer
does NOT work as in this issue. Another example: When you open some
source file in source editor - file is opened but focus stays in
explorer. One another example: Double click on file in explorer which
is already opened in source editor. In MDI focus is transferred to
source editor in SDI focus stays in explorer.

Question: Shall we manage focus in SDI in the same way as we do in MDI?
Comment 2 mslama 2003-06-04 12:52:50 UTC
It would mean to modify behaviour of TopComponent.requestFocus() to
call Window.toFront() when TopComponent's parent window is not yet
focused.
Comment 3 mslama 2003-06-04 13:37:16 UTC
One additional thing: Why TopFrameTypeImpl has non empty setSelected()?
Comment 4 mslama 2003-06-05 14:23:18 UTC
Fixed in main trunk. Method toFront() is now called from
TopFrameTypeImpl.requestFocus().

Tested 'focus follows mouse' mode due to issue #31076 because to fix
#31076 call of toFront() was removed. Focus follows mouse mode works
correctly (Tested on Linux KDE and Solaris CDE.)

Focus is now requested from TopFrameTypeImpl.setSelected(true) only
when window is not focused. Fix of issue #29939 was changed we tested
on windows that focus cycling does not happen. So method
tryRequestFocus() was removed.

Fix also fixes SDI window activation when openign file or double
clicking file in Explorer -> Source Editor frame is selected and focused.

Modified:
core/windows/src/org/netbeans/core/windows/frames/TopFrameTypeImpl.java
r.1.3
Comment 5 mslama 2003-06-06 13:57:46 UTC
*** Issue 33814 has been marked as a duplicate of this issue. ***
Comment 6 Marian Mirilovic 2003-06-11 10:56:02 UTC
verified in [nb_dev](200306110100)
Comment 7 mslama 2003-06-17 12:42:52 UTC
*** Issue 32716 has been marked as a duplicate of this issue. ***
Comment 8 mslama 2003-07-16 15:26:22 UTC
*** Issue 34935 has been marked as a duplicate of this issue. ***
Comment 9 mslama 2003-09-11 10:23:22 UTC
*** Issue 35824 has been marked as a duplicate of this issue. ***