Bug 153920 - Windows not opening in default / primary monitor
Summary: Windows not opening in default / primary monitor
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.1.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Multimonitor
  Show dependency treegraph
 
Reported: 2023-03-02 09:06 UTC by MB
Modified: 2025-01-03 03:11 UTC (History)
5 users (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 MB 2023-03-02 09:06:16 UTC
Description:
In Multimonitor configuration if the default/primary monitor is on the right, opening a Libreoffice application opens on the left monitor which is not the default/primary.
The same applies if you try to open an encrypted document (eg calc). The popup window for the password goes to the wrong monitor. Sometimes it goes to the other monitor than the one where the main window is!

Steps to Reproduce:
1.Make a multimonitor setup. Put the default/primary monitor on the right.
2.Try to open a libreoffice application.
3.Application will open on the left monitor not the default/primary on the right.

Actual Results:
Windows open on different monitors than the default/primary one.

Expected Results:
Windows should open on the default / primary monitor, because users could have the rest monitors powered off.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: el-GR (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.5.1~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 V Stuart Foote 2023-03-02 21:25:11 UTC
Since LibreOffice vcl composes to a virtual display with left most 0,0 on the left display it is not surprising that launching on non-primary monitor happens. You can look at the user profile for the ooSetupFactoryWindowAttributes for each module and follow along for changes for LO launch with different display configurations and module use.

Losing content off display probably shouldn't happen. 

But seems an issue for the backend vcl to get the LO Start Center and modules to adjust onto the correct "default" display when secondary monitor is not available. Either translate, or fall back to single display defaults.

@Jan-Marek would multi-head display testing be something more needed with the vcl::WindowPosSize work?
Comment 2 Stéphane Guillou (stragu) 2023-03-16 11:13:36 UTC
I could not reproduce, from LO 7.2 through 7.5.1.2 to a recent trunk build. Splash screen and window open on the main display if the pointer is there too.

However, when the main monitor is on the left, I can often see the LO splash screen pop up on the right screen even though the window opens on the left and the cursor stays on the left. So there is an inconsistency there.

Other apps like Lollypop, QGIS, Zotero will open as expected on the active, main display. On the other hand, I could see Electron apps like RStudio and Element open in the wrong display.

I am using Ubuntu 20.04 with GNOME 3.36.8 on Wayland.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 44837a12d12be3e525fa48b37c3dd2553cc97d94
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 BogdanB 2024-12-27 11:10:15 UTC
MB, can you retest this bug, it is the same with LibreOffice 24.8.4 recently launched?
Comment 4 MB 2025-01-02 07:57:31 UTC
Hi, currently I have Libreoffice 24.2.7.2 installed.
Having my primary monitor on the right here are some senarios tested:

1. Opening a calc file from a file manager on the primary monitor (on the right), the application correctly starts on the primary monitor


2. Opening a calc file from a file manager on the secondary monitor (on the left), the application starts on the primary monitor on the right. This could be debated if the wanted behavior is to open always on the primary or to open where the mouse cursor is. Some apps open where the mouse cursor is the moment of opening.

3. Opening an encrypted calc file from a file manager on the primary monitor (on the right), the application correctly starts on the primary monitor and the popup window for the password correctly opens on the primary monitor.

4. Opening an encrypted calc file from a file manager on the secondary monitor (on the left), the application starts on the primary monitor (on the right) BUT the popup window for the password opens on the secondary monitor (on the left), which is WRONG! Often I have open only my primary monitor on the right so the password window is not even visible!

In my opinion the corrections that should be done is:
1. Open the application on the monitor that the mouse cursor is during opening
2. Open the popup password window on the same monitor as the application
Comment 5 QA Administrators 2025-01-03 03:11:22 UTC Comment hidden (obsolete)