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

(Partly) stop background apps taking focus from the terminal #498

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AtkinsSJ
Copy link
Contributor

@AtkinsSJ AtkinsSJ commented Jun 26, 2024

This is a slightly hacky solution which doesn't work 100% of the time, but it's a lot nicer to use the terminal with git with these changes. (Previously, the terminal would lose focus after every git command which gets annoying fast.)

What stops this being a full fix is that the windowing code doesn't know if a window is a background window or not. They still go into the window_stack, and so when a window closes (like git's) it focuses the next window on the stack, and if that's phoenix then the terminal loses focus.

I started playing with a Service for managing windows, but that's a much bigger task and I didn't want to get too distracted. 😅 I think that can be a lot neater though.

AtkinsSJ added 3 commits June 26, 2024 12:46
This is a bit of a temporary hack for HeyPuter#453, and only partly effective.
Long-term we probably want a WindowService instead.
@AtkinsSJ AtkinsSJ mentioned this pull request Jun 26, 2024
@KernelDeimos
Copy link
Contributor

KernelDeimos commented Jul 9, 2024

This is pretty deep in gui logic for something that doesn't work 100% of the time; I don't understand the full ramifications of this so I'll need @jelveh 's input. I think this should probably be fixed properly without any intermediate fixes. (i.e. background apps shouldn't go on the window stack, as you mentioned)

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

Successfully merging this pull request may close these issues.

2 participants