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 108834 - Aggressive focus grabbing by the editor
Summary: Aggressive focus grabbing by the editor
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2007-07-04 02:47 UTC by ivan
Modified: 2008-12-22 10:19 UTC (History)
5 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 ivan 2007-07-04 02:47:59 UTC
Upon switching SunStudio/dbxgui code to NB6.0 it was noticed that the
symptoms described in 30979 are back. Specifically as you type
step or next inside the dbx console the editor grabs focus.

We use Line.show(Line.SHOW_SHOW) and SHOW_SHOW specifically shouldn't
cause focus to move to editor.

30979 was dominated by discussions of focus-follows-mouse but that
is not an issue in this case  because in SunStudio the default for term is
click-to-type (although I have my motif window manager set to focus-follows-mouse.)

Another difference from 30979 is that the focus grabbing is more aggressive and
at the X-window level. For example, I was debugging NB with dbx (yes, dbx can debug
java) in a separate window and when the NB editor grabbed the focus my separate dbx
window lost it's!

This is with JDK1.5.0_12 on solaris9-sparc.
5.5.1-based SunStudio with the exact same setup doesn't exhibit this problem.
Comment 1 David Simonek 2007-07-10 12:43:56 UTC
Passing to Marek who knew 30979 well, thanks Marek.

Also ccing editor guys, as it seems that impl of Line.show(Line.SHOW_SHOW) changed in some way.
Comment 2 mslama 2007-07-10 14:12:14 UTC
Please send me separately pointer where can I get SunStudio build (new and old one so that I can compare behavior and
identify responsible change. Thanks.
Comment 3 Vitezslav Stejskal 2007-07-10 14:17:35 UTC
There were some changes in openide/text to add support for Line.SHOW_REUSE and SHOW_REUSE_NEW.
Comment 4 mslama 2007-08-13 16:11:28 UTC
org.openide.text.EditorSupportLineSet$SupportLine.show(EditorSupportLineSet.java:93) is resposible for activating editor
when Line.show(Line.SHOW_SHOW) is called. Code resposible for it is:
1.5          (jglick   04-Apr-07):             if (kind != SHOW_TRY_SHOW) {
1.5          (jglick   04-Apr-07):                 editor.getComponent().requestActive();
1.5          (jglick   04-Apr-07):             } 
Comment 5 Petr Nejedly 2007-08-14 07:30:52 UTC
No, it was actually broken by me in v1.4 (I called editor.getComponent().requestActive(); unconditionally).
Jesse have slightly improved the situation, but forgot about SHOW_SHOW.
Comment 6 Petr Nejedly 2007-08-14 07:32:33 UTC
Fixed, please verify it works as expected for you.
openide/text/src/org/openide/text/EditorSupportLineSet.java,v1.6
Comment 7 ivan 2007-08-31 04:04:09 UTC
It works in the trunk version of Aug 30th.
Thanks.