Skip to content

Conversation

@PrayagCodes
Copy link

No description provided.

When users launch background applications from the terminal, they expect
to continue working in their current window without interruption. However,
the current implementation was causing background applications to steal
keyboard focus from the active window.

Changes:
- Added check in launch_app.js to prevent focusing background apps
- Added check in ExecService.js to prevent focusing background apps
- Added infrastructure to mark apps as background when launched
- Implemented & operator support in shell parser for background processes
- Updated PuterAppCommandProvider to respect background flag

The fix ensures that:
- Background applications launched from terminal do not steal keyboard focus
- Terminal retains focus after launching background apps
- Users can continue typing immediately after launching background apps
- Existing window focus behavior for interactive applications remains unchanged

Fixes focus-stealing bug when launching apps with & operator.
add options.background to UIWindow
component to prevent focus at creation and during drag-and-drop.

- Add options.background property (defaults to false)
- Prevent focus at initial window creation if background
- Respect background flag in drop and dragster:enter handlers
- Pass background flag from launch_app.js to UIWindow

Provides component-level focus control and complements IPC attachment
focus prevention for comprehensive coverage.
@PrayagCodes PrayagCodes marked this pull request as draft December 6, 2025 08:59
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.

1 participant