according to these links
(and many more, just google "stealing window focus" )
there are many people who hate when the window focus is stolen by another application, me included. Starting the IDE steals the focus not just one time, but twice (splash and main window). Please disable it.
And sorry I did not post it earlier, I was not researching about this before now...
100% agree. This is currently raised as an enhancement, but I'd argue that it's a design defect.
If your primary task is developing the NetBeans IDE then this may not appear to be an issue, but for anyone multitasking, it most certainly is.
It's particularly significant since during time required to start the IDE or begin debugging, I have often switched to working in another application in order to remain productive. It's intensely aggravating to have focus stolen back to the NetBeans main code window several seconds later.
I'm sure whomever implemented this meant to be helpful, but it's simply not good behaviour to move focus, and especially jarring to steal it from other applications. I'll come back to NetBeans when I'm good and ready to deal with it - in the mean time, please don't assume that I've got nothing better to do.
Thanks for your attention.
Focus is also stolen when files are changed by another application (SCM tool in my case). Almost annoying enough to work on in my free time.
This is highly annoying to me as well. Please make it stop! It seems like it would be a simple change too. If the nb devs prefer this, then perhaps they can make it a configuration param that is set to false (don't steal) but default. That way they can override during development for easier work on the platform. But for the rest of us, this is REALLY undesired behavior.
Is someone looking into this? It would be great to have a setting option to completely turn off focus stealing, even from within netbeans. Whenever I finish an SVN check, it will steal focus from the coding I'm doing to show me the log output. This is so frustrating.
This issue is still present in 8.0.1
I've finally found an option for disabling this behaviour; it's called IntelliJ.
This issue is still present in 8.0.2
It happens multiple times at start-up which takes a while. This means it steals the focus even if you can't use netbeans because it is still starting.
Very annoying indeed.
I am using 8.0.2 and find that the focus stealing that takes place during builds is very annoying and just 'not right'.
please fix this issue.
this is not an enhancement request, this is actually a defect!!!
Initial efforts to resolve this were unsuccessful. This makes fixing this out of scope for 8.1 release. On another note you can start ide with --nosplash that will not show any splash screen when starting and thus there will at least be no focus stealing while start-up. Thank you
Bug waiver for 8.1 approved.
The current behavior is the Java's default one.
Fixed by changeset: 299972:c1c6384a51a8
Unfortunately, when showing a window, Java decides to raise it to the top of the windows stack. This behavior can not be changed, it's hard-coded in XWindowPeer.xSetVisible() where it calls XlibWrapper.XMapRaised(). And that raises the window.
Therefore, unless the window/dialog is already visible, we should also request a focus. Having a raised window without focus seems silly to me.
Due to that unfortunate behavior of Java GUI we need to revise this fix...
FYI: I've submitted: https://bugs.openjdk.java.net/browse/JDK-8163591
Integrated into 'main-silver', will be available in build *201608110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #177712: Do not steal focus.
The default behavior is more similar to the original one now:
By default, new windows both move to the front and grab the focus.
However, the exception dialog does not grab the focus when already opened and new exceptions are thrown - this was annoying.
The default focus behavior can be altered by -J-Dnetbeans.winsys.auto_focus property. When -J-Dnetbeans.winsys.auto_focus=false, then new windows/dialogs will not grab focus. When -J-Dnetbeans.winsys.auto_focus=true, old behavior is restored, including grabbing focus on exceptions.
In the past, Java apps used to blink it's item on the task bar instead of forcibly fronting and grabbing the focus. That was nice, but that behavior seems to be gone... :-(
Use -J-Dnetbeans.winsys.auto_focus=<true/false> as appropriate.
Integrated into 'main-silver', will be available in build *201608120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #177712: Due to JDK-8163591 change the default, new windows both move to the front and grab the focus.