Bug 139876 - Launching Calc with file parameter does not bring window to foreground if LibreOffice window open
Summary: Launching Calc with file parameter does not bring window to foreground if Lib...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-24 07:49 UTC by Dan Dascalescu
Modified: 2025-09-17 12:15 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 Dan Dascalescu 2021-01-24 07:49:55 UTC
1. Have the LibreOffice window open
2. From a terminal, launch `libreoffice7.0 --calc somefile.ods`

Notice that Calc doesn't come into foreground. Is this intended? If so, it doesn't quite match the behavior of double-clicking ODS files from file managers.

3. Close the spreadsheet, but keep the LibreOffice window open
4. From the terminal, run `xdg-open somefile.ods`

Same result, Calc stays in the background.

5. Repeat step 3
6. From Nemo, double click an ODS file

Notice the focus is... somewhere, but neither in the sheet, nor in Nemo?

7. Repeat step 3
8. Double-click an ODS file from Double Commander

Same result as after Step 2.

I don't know how Double Commander executes the file association; I haven't configured anything specifically, so perhaps xdg-open?

Partial screencast at https://youtu.be/z96ffAdFCzU

Runnint Linux Mint 20.1. This might be the case with other LO file types, but I haven't tested. It's a common issue when the LO window is open with one file, and the user to open another one - the new file will be opened, but Calc won't receive focus, which is probably not what the user expects.
Comment 1 Jean-Baptiste Faure 2021-08-15 16:24:53 UTC
Not reproducible for me with 

Version: 7.2.1.0.0+ / LibreOffice Community
Build ID: fb36611e73c653a883bb899782557a6939911b62
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded

Not reproducible with

Version: 7.1.6.0.0+ / LibreOffice Community
Build ID: c2c2f74e26c8a7da78a8daee4671e1cb14509c12
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Ubuntu_20.04_x86-64
Calc: threaded

OS : Ubuntu 20.04 with Gnome.

Please, could you try a newer version of LibreOffice?
Status has been set to NEEDINFO, please set it back to UNCONFIRMED once requested information has been provided.

Best regards. JBF
Comment 2 QA Administrators 2022-02-12 03:37:55 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2022-03-15 03:56:43 UTC Comment hidden (obsolete)
Comment 4 Pierre-Alain TORET 2025-09-17 12:15:03 UTC
I can reproduce the same behaviour on my machine running ArchLinux (Gnome).
gnome-shell 1:48.5-1
nautilus 48.4.1-1

Version: 25.8.1.1 (X86_64) / LibreOffice Community
Build ID: 580(Build:1)
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.utf8); UI: fr-FR
25.8.1-2
Calc: threaded

The behaviour is also observable using Nautilus (Gnome file-manager, also known as Files) only.

1. Open a file spreadsheet.ods double-clicking with Nautilus (if no instance of Libreoffice open, that new window will take the focus, so you will switch from seeing your file in Nautilus, to seeing your newly opened file in Calc)
2. In the Calc window, use File->Close to close only the spreadsheet.ods file and being bring back to the main Libreoffice window
3. Switch back to Nautilus and double-click to open any other file that should open with Calc (using a .odt file for example will not trigger the bug).
4. The focus stays on Nautilus, and you have to manually switch to the Libreoffice window that is now displaying the file you double-clicked on.

Switching back to unconfirmed as request in https://bugs.documentfoundation.org/show_bug.cgi?id=139876#c1

I stumbled on this bug report after I searched on Gnome side, and found https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6640. I wonder if that might be what's wrong.

Regards,