Bug 168530 - Documents open at the last position not at the very first loading
Summary: Documents open at the last position not at the very first loading
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 41777
Blocks: Start-Center Dialog-Remember-Settings UI
  Show dependency treegraph
 
Reported: 2025-09-24 08:21 UTC by Heiko Tietze
Modified: 2026-01-12 16:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
LOdev20260107_T01_open_separately_4docs_4modules_no_jump (12.80 MB, video/mp4)
2026-01-11 18:49 UTC, Piotr Osada
Details
LOdev20260107_T02_open_separately_4docs_1module_jump (18.98 MB, video/mp4)
2026-01-11 18:51 UTC, Piotr Osada
Details
LOdev20260107_T03_open_at_once_4docs_4modules_no_jump (24.77 MB, video/mp4)
2026-01-11 18:55 UTC, Piotr Osada
Details
LOdev20260107_T04_open_at_once_4docs_1module_jump (12.31 MB, video/mp4)
2026-01-11 18:56 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2025-09-24 08:21:45 UTC
After fixing bug 41777, saving a document at the left side of my screen and another right-hand restores both later at the same position with the same size. 

But when running Writer the first time, my new documents opens at the screen center. And "right.odt" at the very same position. Only then, "left.odt" opens at the left side, and after closing "right" it shows up at the correct position.
Comment 1 fpy 2025-09-30 18:13:26 UTC
no version info ??

note to self ?
Comment 2 Heiko Tietze 2025-10-01 09:13:06 UTC
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7420eb7b55fec40545cbda89167fca34f635b71f
CPU threads: 32; OS: Linux 6.16; UI render: default; VCL: kf6 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

The discussion has run on https://gerrit.libreoffice.org/c/core/+/185189 and this is a follow-up to the patch for bug 41777
Comment 3 Piotr Osada 2026-01-11 08:28:41 UTC
Bug 41777 comment 63 - rewritten comment:

Observed in build: 2026-01-07 (Version 26.8.0.0.alpha0+)

Issue introduced after:
commit 8ce2cf3973ecd428eb8d0290930791ee1c771626 (May–September 2025)

OBSERVATIONS



TL;DR
Documents are initially shown using fallback window geometry (module config / last session), and only afterwards the document-specific saved WindowState is applied, causing a visible window jump.



CASE 1
1) Open with [1] for the first time any document (eg. in Writer)
RESULT: Window is of size and at the position of the last size and position of Writer
That means: work as needed/intended - nice and convenient.


CASE 2
2-1) Open with [1] documents and set documents in different:
position(x_n,y_n), size(x_n,y_n)
2-2) Save documents.
2-3) Close documents in the following order:
Doc1 pos(x1,y1), size(w1,h1)
Doc2 pos(x2,y2), size(w2,h2)
Doc3 pos(x3,y3), size(w3,h3)
Doc4 pos(x4,y4), size(w4,h4)

CASE 2 OBSERVATIONS:
Open Doc1:
Initial window arrangement: pos(x4,y4), size(w4,h4)
after a while*:             pos(x1,y1), size(w1,h1)

Open Doc2:
Initial window arrangement: pos(x4,y4), size(w4,h4)
after a while*:             pos(x2,y2), size(w2,h2)

Open Doc3:
Initial window arrangement: pos(x4,y4), size(w4,h4)
after a while*:             pos(x3,y3), size(w3,h3)

Open Doc4:
Initial window arrangement: pos(x4,y4), size(w4,h4)
after a while*:             pos(x4,y4), size(w4,h4)


CASE 2 CONCLUSIONS
Oppening any document LibreOffice call:
position(x,y)
size(w,h)
of last closed window.


CASE 2) EXPECTED
Oppening n-th document LibreOffice call:
position(x_n,y_n)
size(w_n,h_n)


ACTUAL:
In given LO session, LibreOffice initially sets the window position and size using the geometry of the previously used window, and then resizes to window dimensions saved in WindowState (position and size).


EXPECTED: 
LibreOffice should firstly recall window position and size saved in the document that is currently in the process of opening. If there is no info about the window position and size saved in the document:
LibreOffice should open the document with the position and size last known from the last session.

This suggests that window geometry from the last closed window is applied as a temporary default before document-specific window geometry is asynchronously restored.


[1]
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-01-07_03.31.18/

*'a while' on my computer it is subjectively 
       from 0.5 to 2.0 sec
       with files of sizes ranging from 20 KB to 400 KB
       Let's name this: delayed geometry restoration
       This is because: two-stage window geometry update.
Comment 4 Piotr Osada 2026-01-11 18:49:14 UTC
Created attachment 205002 [details]
LOdev20260107_T01_open_separately_4docs_4modules_no_jump

Test 01:
Open 4 documents separately, each in a different module.

The document-specific WindowState (position and size) is applied immediately.
No window repositioning or visible jump is observed.


Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-01-07_03.31.18/
Comment 5 Piotr Osada 2026-01-11 18:51:21 UTC
Created attachment 205003 [details]
LOdev20260107_T02_open_separately_4docs_1module_jump

Test 02:
Open 4 documents separately, all in the same module.

The window is initially shown using fallback geometry.
After the document finishes loading, the document-specific WindowState
(position and size) is applied.

A visible window repositioning (jump) is observed.


Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-01-07_03.31.18/
Comment 6 Piotr Osada 2026-01-11 18:55:01 UTC
Created attachment 205004 [details]
LOdev20260107_T03_open_at_once_4docs_4modules_no_jump

Test 03:
Open 4 documents at once, each in a different module.

The document-specific WindowState (position and size) is applied immediately.
No window repositioning or visible jump is observed.


Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-01-07_03.31.18/
Comment 7 Piotr Osada 2026-01-11 18:56:41 UTC
Created attachment 205005 [details]
LOdev20260107_T04_open_at_once_4docs_1module_jump

Test 04:
Open 4 documents at once, all in the same module.

The windows are initially shown using fallback geometry.
After the documents finish loading, the document-specific WindowState
(position and size) is applied.

A visible window repositioning (jump) is observed.


Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-01-07_03.31.18/