Bug 169918 - VCL examples windows go to background when started from command line
Summary: VCL examples windows go to background when started from command line
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-09 22:58 UTC by Hossein
Modified: 2026-01-03 03:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2025-12-09 22:58:48 UTC
Description:
When running VCL examples from command line, they go to background and do not take focus. As they don't show any menus on top, smaller windows can easily get lost.

Steps to Reproduce:
1. Build LibreOffice from sources
2. Run a VCL example, for example:
./bin/run minvcl
Or, the one with smaller window:
./bin/run mingled

Actual Results:
A window is created, but you may not find it as it can remain in the background. As the window does not show any menus on top, it may even get lost if it is small. One may think that no window is created.

Expected Results:
Window should get focus, and become visible by coming on the top.


Reproducible: Always


User Profile Reset: No

Additional Info:
This is a known macOS specific behavior, that can be customized/solved if a .app is created for the binaries.

The problem also happens for LibreOffice. If it is executed as below, its main window remains in the back:

% /Applications/LibreOffice.app/Contents/MacOS/soffice
If compiled from sources:
% ./instdir/LibreOfficeDev.app/Contents/MacOS/soffice

In comparison, using "open" with defined apps works just fine.

% open /Applications/LibreOffice.app
If compiled from sources:
% open instdir/LibreOfficeDev.app

Or, by name:
% open LibreOffice
If compiled from sources:
% open -a LibreOfficeDev
Comment 1 Hossein 2025-12-09 23:02:49 UTC
Hello Dan,
Do you have any recommendations here? Is one .app per each binary is good, or creating a bundle that contains all (or maybe most) of the VCL workbenches is a better way?
Comment 2 dcbw@libreoffice.org 2026-01-02 14:44:49 UTC
I would probably do .app-per-binary that has UI we want to show. Should be pretty easy with a simple script.

The alternative would require the same script, but also a dispatcher to run a selected binary, which seems like more work.