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.
I have editor, explorer, properties and TODOs topcomponents. i/ Focus in editor. I click by mouse to propeties on property name, properties TC gets focus but the name row does not. I have to click once again. ii/ Focus in editor. I click on TODOs toolbar button. TODOs TC become active but toolbar action is ignored. I have to click once again. iii/ Focus in editor. I click to TODOs table. TODOs TC is activated and proper cell focused. iiii/ Focus in editor. I click explorer, explorer Tc is activated and proper node selected. i/ & ii/ cases are wrong. Given iii/ works as expected I think that it works only if user clicked on inner component that has default focus. Otherwise the mouse click event is consumed and not propagated to proper target. Any clue? Is it WS bug or property sheet and TODOs focus management is screwed somehow?
JVM 1.4.2-b27, Metal L&F
There is not consumation of that event in WS (WS even uses AWTEventListener for that which is processed I guess after the original events processing). WS does its job as required, it activates that window.. that's right. Those problems have to be in particular components. Please, fire issues against them diretly (i.e. editor and TODO's). They don't work on mouse clicks as expected. Don't group them in one like this. I don't see any connection with WS here.
Created attachment 12525 [details] Simplified TC that demostrates the problem
Attached simple TC showing the misbehaviour. Opened using: TestMouseEvents top = new TestMouseEvents(); Mode mode = WindowManager.getDefault().findMode("output"); if (mode != null) { mode.dockInto(top); } top.open(); top.requestVisible(); top.requestActive();
OK, I'll try it, thanks.
I tired it.. and it has the wrong behavriour. On the other hand I dind't find an exact cause.. I tried to listen on the AWTEvents.. the Mouse pressed event is passed there, and is not consumed by winsys (that's definitely not the cause of this issue)... problem is there wasn't dispatched the ActionEvent... which happened just on the second click... Why? I don't know yet.
I've got it. I.e. I found how to by pass it. But can't explain it precisely yet. Anyway, the activation is done in task scheduled later, it assures the component gets the focus... but it breaks somehow the pressing/releasing of the button: 1) when activated output 2) the going to press the button, (just press, don't release) 3) You see when you press it, the button itself is painted as pressed, but afterwards it gets focus (the activation) and it is unpressed! (you are still holding the mouse pressed). But when I do the activation synch, it works fine. I'll try to look at it more closer, since the postponing of the activation was there due to another issue.
A bit deeper observation: the button is disarmed (setArmed(false) on its button).. therefore it is 'unpressed'.. the disarming happend on focusLost event on that button. This is strange.. the button shouldn't loose focus, it should just get it! Continuing..
I just filed what may be a duplicate - issue 38080
Fixed in [trunk] core/windows/../view/ui/TabbedListener.java 1.4
Thank you, it works now.