Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor grabs focus when opening files at startup #3585

Closed
chrisgee opened this issue Oct 23, 2016 · 5 comments
Closed

Editor grabs focus when opening files at startup #3585

chrisgee opened this issue Oct 23, 2016 · 5 comments

Comments

@chrisgee
Copy link

chrisgee commented Oct 23, 2016

Description of your problem

What steps will reproduce the problem?

  1. In spyder open a couple of files in editor
  2. Close spyder and restart

What is the expected output? What do you see instead?
After the main window appears, it is grabbing focus for each file that is reopened from the previous session. In addition each of these files is put to the front of the editor window.

Reopening files in a thread is a good idea to reduce startup time. However, at the moment this is not effective, as the user will not be able to do anything (neither in spyder nor in any other application) until all files are loaded.

Please provide any additional information below

Versions and main components

  • Spyder Version: 4.0.0dev 858193f
  • Python Version: 2.7.12
  • Operating system: osx 10.10
@chrisgee
Copy link
Author

... more over, the files are opend twice if a project was active (I guess first spyder opens it's list and then later the project) -> should this be put in a separate issue?

@ccordoba12 ccordoba12 changed the title editor grabs focus when opening a file Editor grabs focus when opening a file Oct 23, 2016
@ccordoba12 ccordoba12 added this to the v3.1 milestone Oct 23, 2016
@ccordoba12 ccordoba12 modified the milestones: wishlist, v3.1 Oct 24, 2016
@ccordoba12
Copy link
Member

Thanks for reporting. I opened an issue about files being opened twice at startup when a project is active. We'll fix this problem in 3.0.2.

I don't know what to do about this one though. It seems a problem when you have a lot of files opened in your last session (30, 50?), but nobody has complained about it before :-)

@jitseniesen
Copy link
Member

I think even with a handful of files it's slightly annoying though it wasn't annoying enough for me to complain about.

@ccordoba12
Copy link
Member

I think the solution would be to prevent our load function to steal focus at startup. Let's assign one of our juniors to it :-)

@ccordoba12 ccordoba12 changed the title Editor grabs focus when opening a file Editor grabs focus when opening files at startup Oct 24, 2016
@chrisgee
Copy link
Author

OK. Maybe I am too impatient … ;-) and maybe there is something wrong with my setup.

Anyway I can see the files open one by one (about 1-2 per second). Don’t know if others observe the same. Since I am developing a plugin, restart spyder frequently, 10 seconds waiting for my 10 files to open (20 when I have a project active) is getting on my nerves…

I imagine the quick fix would be, to not put each newly opened file on the front tab (e.g. open the one that was front last time first, then add tabs in the background without setting the focus). A way to speed up things may be to skip parsing each file (at least an outline is generated for each while loading) and deferr that to the moment the user switches to the file…. what do you think?

Cheers,
C.

On 24 Oct 2016, at 03:55, Carlos Cordoba [email protected] wrote:

Thanks for reporting. I opened an issue about files being opened twice at startup when a project is active. We'll fix this problem in 3.0.2.

I don't know what to do about this one though. It seems a problem when you have a lot of files opened in your last session (30, 50?), but nobody has complained about it before :-)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Christoph Gohle
[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants