Motivation
When users launch background applications, they expect to continue working in their current window without interruption. However, the current implementation treats all newly created windows equally, causing background applications to steal keyboard focus from the active window.
This is a general problem that can occur in multiple contexts across the system, but it is most noticeable in the terminal.
Current Behavior
When a background application is launched from the terminal, the newly created window automatically receives keyboard focus, even though it's not visible or interactive.
Reproduction Steps
-
Open the Terminal application in Puter
-
Create and run a simple background test script:
echo "echo Running background process; sleep 5" > background-test.sh
chmod +x background-test.sh
./background-test.sh &
-
Attempt to continue typing in the terminal immediately after launching the background app
-
Observe: The terminal no longer has keyboard focus, and keystrokes are not registered in the terminal
Expected Behavior
When a background application is launched, it should run without stealing focus from the currently active window. The terminal (or any other active application) should retain keyboard focus, allowing users to continue their work uninterrupted.
Acceptance Criteria
Steps To Test
- Go to Puter and open the terminal
- Launch a background application from the terminal using the test script above
- Immediately start typing in the terminal without clicking
- ✅ Verify that your keystrokes appear in the terminal (focus was not stolen)
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx
Motivation
When users launch background applications, they expect to continue working in their current window without interruption. However, the current implementation treats all newly created windows equally, causing background applications to steal keyboard focus from the active window.
This is a general problem that can occur in multiple contexts across the system, but it is most noticeable in the terminal.
Current Behavior
When a background application is launched from the terminal, the newly created window automatically receives keyboard focus, even though it's not visible or interactive.
Reproduction Steps
Open the Terminal application in Puter
Create and run a simple background test script:
Attempt to continue typing in the terminal immediately after launching the background app
Observe: The terminal no longer has keyboard focus, and keystrokes are not registered in the terminal
Expected Behavior
When a background application is launched, it should run without stealing focus from the currently active window. The terminal (or any other active application) should retain keyboard focus, allowing users to continue their work uninterrupted.
Acceptance Criteria
Steps To Test
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx