Bug 224547 - NB doesn't activate fully when cursor moved into NB's frame with jdk7, winXP and xmouse
NB doesn't activate fully when cursor moved into NB's frame with jdk7, winXP ...
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Window System
7.2
PC Windows XP
: P3 with 1 vote (vote)
: 7.4
Assigned To: Stanislav Aubrecht
issues@platform
: REGRESSION
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-06 22:10 UTC by err
Modified: 2013-08-21 14:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description err 2013-01-06 22:10:16 UTC
After clean NB install, no plugins. WinXP config'd for X-Mouse using 
PowerToys > Tweak UI > Mouse > X-Mouse (activationFollowsMouse=YES, Autoraise=NO)

- Start NB
- Move mouse to other app, e.g. a browser
  Observe that the NB editor cursor in stops blinking
- hit some keys while mouse is over other app
- Move mouse over NB
  Observe that NB editor cursor starts blinking
- hit some keys, e.g. cursor movement keys
  Observe that keys are delivered to previously active/focused window

Note: jdk6 works correctly
Note: also fails with NB-7.2

(autohide taskbar doesn't matter)

Product Version: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Updates: NetBeans IDE is updated to version , NetBeans 7.3 Beta 2
Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Stanislav Aubrecht 2013-01-07 09:53:45 UTC
Please run some plain Swing app, e.g. SwingSet demo with the same JDK and reopen if the problem is not reproducible in that app, thanks.
Comment 2 err 2013-01-07 15:16:43 UTC
SwingSet2 works as expected.

BTW, though different, this is reminiscent of Bug 175809 (which does not depend on jdk) where key events get delivered to the editor, but the undo/redo buttons are not enabled.
Comment 3 err 2013-01-10 20:45:52 UTC
I work with a single screen and sometimes want to refer to a window on top of NB while I am focused/typing into NB. With this bug there is no way to do that since I must mouse click on NB and that raises the NB window.

Here's a further observation on the behavior I see: When the mouse moves from the other app to NB, NB's taskbar icon starts blinking. This blinking is typically the behavior I see when a modal dialog pops up.
Comment 4 err 2013-03-25 18:52:23 UTC
Soon there will be no workaround for this issue, since jdk7 is becoming required; bumping back to P3.

This greatly interferes with my workflow. When the mouse comes back to the NetBeans frame, the taskbar unhides and the NetBeans task icon highlights. It is as though XP thinks NB has made a modal request (or something like that). With other apps, when the task icon highlights this way, all that is required is to mouse over the app, this doesn't work with NB since a click is required.

Where is the likely code that is responsible for this issue? If I can find time, I'd like to take a look. (Much better for me to explore a fix now, rather than get a bug report against 7.4 and being unable to work efficiently.)

(I wonder if this happens on more recent window platforms?)
Comment 5 Stanislav Aubrecht 2013-03-26 10:05:01 UTC
Try debugging TopComponent.requestFocus() and TopComponent.requestFocusInWindow() methods.
Also can you reproduce that behavior with other windows than code editors?
Comment 6 err 2013-03-26 17:23:12 UTC
> can you reproduce that behavior with other windows than code editors?

Yes
  - The welcome window on startup with a clean userdir/cachdir.
  - When focus is in the projects TC with no editor open.
Comment 7 err 2013-03-27 00:38:00 UTC
(In reply to comment #5)
> Try debugging TopComponent.requestFocus() and
> TopComponent.requestFocusInWindow() methods.

The behavior "the taskbar unhides and the NetBeans task icon highlights" occurs when the mouse is moved over the *titlebar* of NB's Frame (not over any netbeans window/component). The method InputListener.mouseEntered is not triggered.

The methods requestFocus* are never triggered.

I think that because the NB entry in the taskbar is blinking, that no events are delivered to NB until the Frame is clicked.

I can't tell if an event is posted to Java's eventQ when the mouse enters the taskbar. I don't know how to ignore all the timer events.
Comment 8 err 2013-03-27 06:53:12 UTC
I put a breakpoint in DefaultKeyboardFocusManager::dispatchEvent and when the mouse is moved into the Frame there is ACTIVATION then WINDOW_GAINED_FOCUS events. It's unclear to me what should be happening with these...
Comment 9 Stanislav Aubrecht 2013-03-28 16:13:10 UTC
I'm out of ideas...

Can you try a simple platform application to see if the problem is reproducible there?
And how about when a modal dialog window is showing, e.g. Open Project?
Comment 10 err 2013-03-28 16:27:00 UTC
> Can you try a simple platform application to see if the problem is reproducible
> there?

Is there an example/source of a minimal platform app kicking around?
Comment 11 Stanislav Aubrecht 2013-03-28 16:37:04 UTC
(In reply to comment #10)
> > Can you try a simple platform application to see if the problem is reproducible
> > there?
> 
> Is there an example/source of a minimal platform app kicking around?

Just use the New Project wizard to create 'NetBeans Platform Application'. (You may need to activate NetBeans Plugin Development in Tools - Plugins - Installed.)
Comment 12 err 2013-03-29 15:42:44 UTC
Looks like this is a generic java7 issue; my earlier test must have been flawed, because SwingSet2 also exhibits the problem. 

The "Troubleshooting Guide for Java SE 7 Desktop Technologies" has a section on "Problems with Focus", including "Focus Models Supported by X Window Managers"
http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/awt.html#gcwun which says that focus-follows-mouse mode is not detected by xawt; Windows also I guess.

It suggests a workaround 'MouseListener on the window and request focus on it when mouse crosses the window borders", so I may play with this. Maybe build a module with a boolean option. I'm not sure a 3rd party module can provide a general NB solution, because need to discover new windows when stuff is undocked.
Comment 13 err 2013-03-29 16:11:10 UTC
Further reading of the troubleshooting guide suggests that there should *not* be a problem with Frames, only with Windows.
Comment 14 Stanislav Aubrecht 2013-08-21 14:03:46 UTC
Closing as wontfix as there's no code to react to mouse-over in IDE title bar.

Possibly also related to JDK bug #9001180 (which isn't public at the moment).
Comment 15 err 2013-08-21 14:49:35 UTC
> Possibly also related to JDK bug #9001180 (which isn't public at the moment).

Yes, I filed that on March 29. After filing I got email would be available as http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001180 in a few days. Do you have any insight on this private/public thing and what that means about the status of the bug?
Comment 16 Stanislav Aubrecht 2013-08-21 14:59:20 UTC
(In reply to err from comment #15)
> > Possibly also related to JDK bug #9001180 (which isn't public at the moment).
> 
> Yes, I filed that on March 29. After filing I got email would be available
> as http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001180 in a few days.
> Do you have any insight on this private/public thing and what that means
> about the status of the bug?

I can see the private bug report but there was no activity on that bug since it has been filed.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo