Don't steal focus

Answered

Most every morning I sit down, start up my computer and start up all the programs I will be working with that day. I usually proceed to read my email first. Unfortunately, Intellij, like so many products, thinks it is the most important program ever and it must have my attention. So it steals focus and puts itself right in my face. However, I tend to have between 2-4 projects open in different windows. So it does this not only once but for each project.

IMO there is never a case for focus stealing. One could make a case for security software which may have a legitimate need to demand direct action. I also think such a case has never occurred in my life. I suppose any kind of alarm program could make the case. I still wouldn't agree, but I can see that some people would. However IntelliJ has no case whatsoever to steal focus. Focus should be on what I am focussed on. Just because I started the IDE does not mean I intend to work with it right now. Untill someone implements a telepathic focus algorithm programs should just start up in the background and let me continue with whatever I am doing.

85 comments
Comment actions Permalink
Official comment

Hello all,

We are sorry for the irrelevant notifications some users have got. The https://youtrack.jetbrains.com server accidentally got translated into Russian language. This can be considered an operations issue on our side and we did our best to switch back to English. While switching the language back and forth we were also translating persistent saved searches people use to subscribe to issue updates. Apparently some of these queries got unwanted modifications, hence the strange and unrelated notifications some people got. The latter problem is mostly addressed by now.

We're now reviewing https://youtrack.jetbrains.com access scheme to make accidental changes like this one impossible in future. At the same time certain technical measures are to be taken to make database translation process seamless and robust.

You can unsubscribe from the thread by clicking on the link from the e-mail notification:

or click unfollow button in the forum thread:

Comment actions Permalink

Hello Jasper,
Thank you for describing the problem. I've created an issue in our YouTrack. You can track it here http://youtrack.jetbrains.com/issue/IDEA-106716

Konstantin

2
Comment actions Permalink

First of all, I'm not 100% sure about I understood your thoughts, so sorry if I talk about the wrong issue.

If you talk about creating the window in front of all and autogaining focus, opening a program was always that way in Windows.

Anyway, for batch opening programs which you won't pay immediate attention, there are switches in Windows for opening programs minimized. Issue 1: PhpStorm ignores that switch with both splash screen and main window (IDEA issue or Java issue?).

Now, I won't talk about opening several projects, but simply configure it to reopen last project, and then close and start it (PhpStorm will show splash, open main Window, then open project). Try to use another application as @Konstantin says. A fight against PhpStorm starts, during which it will steal focus on splash screen, on main window creation, and in several moments of the project opening, scanning, etc. So Issue 2: please, if it wasn't specified in other way by the OS, I understand that in first term the splash screen launches focused. But if in any moment another Window is focused, IDEA mustn't try to gain focus again, at least not until all initial actions are completed and the program is fully ready for use.

Now @Konstantin, if what I talked about is not what you said, please correct me, so we can move forward to improve support in IDEA-106716.

0
Comment actions Permalink

Thanks for your reply. I know that windows has always worked this way. I am a linux user (unless I am playing a game). Just because something has always been done some way doesn't make it right.

I regularly work with 2-4 projects. Related, but distinct projects. I like to keep the in seperate windows, separate workspaces. There is no need for Intellij, or any program, to grab focus. I think many people start multiple programs at once, certainly software developers. That means you always have to wait as each program steals the focus. I think it is poor UI design, and I have always thought so. Splash windows are even more annoying as they are completely useless advertising while I would like to be doing something else.

The solution is simple. Dont steal focus. It is unnecessary and counterproductive.

17
Comment actions Permalink

Hi again. Hmmm... I understand what you say.
Now, I'll talk again from windows perspective (if there is something from Linux perspective I am missing, please correct me).
When I want to open a program in Window, yo may to whatever you want, launch from a console, double click its shortcut in the desktop, click its icon in Start Menu... in every case theres another application that has focus (cmd.exe, explorer.exe)... If application doesn't try to gain focus as soon as it starts, it wouldn't be visible! So it will require a second user interaction to make it ready.
Can you imagine an alternative way to work?

-9
Comment actions Permalink

By the way, I also created http://youtrack.jetbrains.com/issue/IDEA-106794, which will be an improvement in focus loosing when opening IDEA

0
Comment actions Permalink

Hmm...this can't be true. Mostly I play games on windows, which is usually fullscreen (ok, you can steal focus if you are a full screen app). You don't need focus to start up a window though. Can't think of any example of the top of my head, but I know programs can start up without focus. All you need to do is everythign yo would normally do, but when starting the UI don't place it on top. I am not a UI programmer though. I know that Linux window managers generally offer support for this. Theoretically I can even tell my window to never allow programs to grab focus, but I've found that these settings never work for the programs that irritate me (in this repsect, I like IntelliJ or I wouldn't be offering feedback). Visibilty is adding an icon somewhere to the windows list. If windows can exist in minimized state, underneath other windows then they can also be started up that way, I would think. It is possible Windows does not allow this, though that would surprise me greatly.

3
Comment actions Permalink

Hi Jasper.

Of course I'm not saying it's not possible to prevent stealing focus... Be whichever the API you use for creating your windows, you can create them minimized so they won't start focused.

I'm simply asking myself if we could consider that (the non foucs stealing mode) the correct way of creating windows and suggest to replace the old one, so many years after the invention of the GUIs and when everybody is now used to the current scheme. I want to recall that you proposal, in case of a closed program which the user wants to open to start working immediately (and in the ideal supposition of a program which lasts just a second to open), will force the user to interact twice: launch the program, and then brong to front its window. And I think that if we could make a study about it, I think that the 99% of the program executions in the computer workd everyday match this criteria, and the lasting 1% match the situation you're describing.

Of course I'm not saying youre complains are unnecessary: there's a severe usability problem here. Anyway, I don't think that inventing a new program opening logic and replacing current with new will be an interesting way to go. Make it configurable? Well, maybe it's possible - I suppose that once the porgram it's launched it won't be any technical issue, but for example as you can see splash screen ca't be managed from settings from settings (IDEA-106794). But again, here we have two problems: focus on opening program, and foucs on opening project. The first of both shouldn't be an issue because OS has already built-in ways to do that - the problem here is that IDEA doesn't handle them, so that should be the true request.

Now, please I'll ask you again that if you can, tell me if everything I said applies to other OSs, bacause if it doesn't then I should start thinking from zero about the issue.

Best regards Jasper.

-2
Comment actions Permalink

You are not entirely right nor entirely wrong. Consider however that your product can not be considered in the 99%. It is a proffesional product for developers. People using Intellij have a very diffferent pattern than sitting down to play a game, browse the internet, watch a movie...these are all very different thigns from sitting down to get to work. Even if I intend to start right away, Intellij conflicts with itself as multiple windows opening will each steal focus from each other. I personally still consider all forms of stealing focus wrong, but you are not incorrect that it is a sort of standard, which makes my feelings somewhat irrelevant for the general case. Splash screens are even worse, as they are basically a form of commercial with no value to the user other than to block whatever it is they are looking at and a limited amount of information which mostly no one is interested but if they are they wouldn't generally get it from a splash screen.

oh and one more thing. If I open a global text search I actually do expect it to steal focus so I start typing right away. Yet everytime it turns out I am typing in my class/document instead of in the search box. AFAIK Intellij is the only program that exhibits this behaviour.

3
Comment actions Permalink

Jasper, in the end I totally agree with you in which respects to what I'd love to see when I sit to develop. I just wanted to recall that seems a very hard decission to a develpment team to implement something that goes against absurd but "standarized" rules... I hope I'm wrong and they will consider your petition... hmmm... also hope they implement it configurable, maybe in the end I won't like it, never know ;)

About splash screen, well, just add that they are intended to accomplish a classical developing rule which says that the program can't last too much without making any visual signal of responsiveness to the user, so the splash has the mission to say "loading". Again, more trash to the power user. By the way, disabling splash is already supported, see answer to IDEA-106794.

I'll vote your issue. I also will create the ones I think are the friendliest way of splitting and solving the main usability problem, and suggest linking all together: respect OS flags to start minimized (focus steal ono start won't be a problem anymore) and stop stealing focus on project reopening.

Jasper, very nice to talk to you. best regards.

0
Comment actions Permalink

I have a different kind of workflow with rubymine that solves the same kind of problem.   I have one jet brains project for all my code bases ie I root the project at the top of my code home directory ie ~/workspace/  as I use to be a eclipse guy.   Because jet brains has the sweet git integration I just expand a different folder each sub project and work from a single jet brains project window.  This all makes keyboard shortcuts work better as I do not have to switch between different jet brains project windows but always search in my current window. 

-2
Comment actions Permalink

While I appreciate the update, I'm not sure how I got on this list.

6
Comment actions Permalink

I'm not sure how I got on the update list for this thread. When I try to change notification settings, it's all in Russian. We got hacked or something?

1
Comment actions Permalink

@Mickael Powell - I'm in the same boat, no idea how I got on this list either.

0
Comment actions Permalink

Same here, login page is also in Russian or something like that. Sorry to hijack this issue, but what the hell is going on?

 

> You (swegener) received this message because you had enabled notifications for: Назначенные на меня,Созданные мной saved searches.

0
Comment actions Permalink

I think the notification is a mass phishing scam email. It's coming from onmicrosoft.com



0
Comment actions Permalink

When I read about this discussion, I realised how annoying it is for me too - I have 10 or so microservices projects in 10 IntelliJ idea projects opened simultaneously. When I close all of them and reopen idea again, I want all of them to reopen too, but they keep stealling the focus as they become loaded. So its like I start idea > I go to e-mail client and start reading > first project loads and (without fully initialized/compiled/reindexed, it steals focus > I immediatelly return back to e-mail client to continue reading > this repeats 9 more times :) and is making me anxious.

What I would expect is, that:

If I start idea and do not change to different application meanwhile (like email client), I want the window to appear and have focus (I do not want it to start in background, so that I would be forced to click on it again to bring to focus)

If I start idea and then switch to different app, i do not want the new windows to bring me back to the IDE

(I am long-term windows user who for the last year turned to Unix (Ubuntu))

4
Comment actions Permalink

I got the same as Trung Nguyen1. Or the CIA backed blame stream media planting "fake news".

0
Comment actions Permalink

"I think the notification is a mass phishing scam email. It's coming from onmicrosoft.com"

Possible? Likely? Who knows. no_replay (at) jetbrains (dot) com sounded sane enough.

 

0
Comment actions Permalink

I've also here because of the email. But is it really coming from onmicrosoft? It looks like it passes both DMARC and SPF checks. Maybe a "fix" in YouTrack that went wrong? Should we create a issue for this issue being reported to non-related users? Or isn't that the issue?

 

Delivered-To: xxx@gmail.com
Received: by 10.12.142.143 with SMTP id x15csp1298371qvb;
        Mon, 23 Jan 2017 10:03:34 -0800 (PST)
X-Received: by 10.223.166.137 with SMTP id t9mr24584660wrc.15.1485194614300;
        Mon, 23 Jan 2017 10:03:34 -0800 (PST)
Return-Path: <no_reply@jetbrains.com>
Received: from mail1.intellij.net (mail1.intellij.net. [46.137.178.215])
        by mx.google.com with ESMTPS id i201si15187825wmf.9.2017.01.23.10.03.34
        for <xxx@gmail.com>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Mon, 23 Jan 2017 10:03:34 -0800 (PST)
Received-SPF: pass (google.com: domain of no_reply@jetbrains.com designates 46.137.178.215 as permitted sender) client-ip=46.137.178.215;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of no_reply@jetbrains.com designates 46.137.178.215 as permitted sender) smtp.mailfrom=no_reply@jetbrains.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=jetbrains.com
Received: (qmail 1577 invoked by uid 89); 23 Jan 2017 18:03:33 -0000
Received: from unknown (HELO 300fc4f14ba3) (no?reply@jetbrains.com@52.51.24.31)
  by ip-10-79-47-171.eu-west-1.compute.internal with ESMTPA; 23 Jan 2017 18:03:33 -0000
Date: Mon, 23 Jan 2017 21:03:33 +0300 (MSK)
From: Serge Travin <no_reply@jetbrains.com>
To: Jonas xxx <xxxx@gmail.com>
Message-ID: <25-550457@mail.intellij.net>
Subject: [YouTrack, Voted] Issue IDEA-106716: Don't steal focus
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_209856_361228240.1485194566508"
X-Charisma: 1=>2;5=0 
0
Comment actions Permalink

Maybe someone @ JB was trying to convince their boss for this change, and wanted to see how many people wanted it. I'm all for changing the focus behavior, btw

1
Comment actions Permalink

The "onmicrosoft.com" in the email just means that the email came from an Office365 tenant. It's very likely that JetBrains uses O365 for email. I would chalk the mass mailing up to a bug of some sort in their community system.

ps: stealing is bad, mmkay?

1
Comment actions Permalink

no idea how i got here but i agree, idea shouldn't steal the focus

0
Comment actions Permalink

Receiving the mass email has stolen my focus

7
Comment actions Permalink

Jetbrains, please explain why I got a notification about this.

1
Comment actions Permalink

This thread was just refred to from the issue in the mail. But it seemd the jetbrains servers can't handle the load of all users who received the notification.

1
Comment actions Permalink

Don't know why I got a notification too. But I agree with the post about the focus

2
Comment actions Permalink

AS with many - I've no idea why I was notified.  But ... also as with many, I agree that IDEA should not steal focus during start up.  

3

Please sign in to leave a comment.