Bug 160933 - Writer does not focus (already opened) window when link to other document clicked
Summary: Writer does not focus (already opened) window when link to other document cli...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://forum.openoffice.org/en/forum...
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Multi-Window
  Show dependency treegraph
 
Reported: 2024-05-04 12:47 UTC by kocjs
Modified: 2024-05-29 06:49 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Documetst to test. (47.81 KB, application/zip)
2024-05-20 13:13 UTC, kocjs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kocjs 2024-05-04 12:47:05 UTC
In my documents i have several hyper links that link to sections in other documents. If a document with a link to a section is closed, and I ctrl click the link, the document opens and jumps me to the section.

If a document with a link to a section is opened, and I ctrl click the link, the document remains in background, and only the cursor jumps to the section. That means that i have to switch manually to the document.

IF i click i link i would expect it to bring me to the target. Also, this was working before, i have build my document structure taking advantage of this principle. Unfurtunatelly, i do not know when the regression happened.

I am on debian 12, Bookworm with the default gnome desktop on wayland. Libreoffice 24.2.3 is from backports.

However i have tried with the appimage both fresh and still, the behavior is the same. 

Before filling this bug i have asked in this forum https://forum.openoffice.org/en/forum/viewtopic.php?t=111494. The same appears to happen with LO 24.2 on xubuntu 24.04. However on windows it works as expected according to the participants in the forum.

Please consider fixing this regression,

Best Kocj
Comment 1 Dieter 2024-05-19 07:13:14 UTC
Kochschinken, thank you for the report. Could you please attach a sample file, cause tfat mskes it easier to verify the bug.
=> NEEDINFO
Comment 2 kocjs 2024-05-19 10:52:22 UTC
Hi Dieter, thank you for having a look.

I am very new to this, so please bare with me.

I thought about adding a writer file, actually two files are would be needed. I was thinking the the links will be broken anyways, as the link structure will be different.

Could you please guide me on that?
Comment 3 QA Administrators 2024-05-20 03:14:39 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2024-05-20 13:00:09 UTC
(In reply to kocjs from comment #2)
> Could you please guide me on that?
You could attach a zip file with the two files, the linking using a relative link (instead of absolute).
https://help.libreoffice.org/latest/en-US/text/shared/guide/hyperlink_rel_abs.html

You can attach the zip file here: https://bugs.documentfoundation.org/attachment.cgi?bugid=160933&action=enter
Comment 5 kocjs 2024-05-20 13:13:26 UTC
Created attachment 194227 [details]
Documetst to test.

Thank you for checking in.

Here there are two documents that show the issue.

Best, kocj
Comment 6 QA Administrators 2024-05-21 03:14:13 UTC Comment hidden (obsolete)
Comment 7 raal 2024-05-28 21:36:28 UTC
No repro with Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 71f3be3bee2e8a07f85594c02a9b44627b219e95
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 8 Stéphane Guillou (stragu) 2024-05-29 06:47:22 UTC
Indeed, 7.4.0.4 switches between (already opened) windows, whereas 7.5.9 doesn't anymore.

Reproduced for both gen and gtk3 VCL plugins in 24.2:

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Bibisected with linux-64-7.5 repo to first bad build [cd2833d37048a91ad90deee69ea80e60d2a67e81] which is:

commit 42d197ef301db68e56f7e45b6e36ace5fae04b4d
author	Mike Kaganski 	Sun Sep 04 13:39:27 2022 +0300
committer	Mike Kaganski 	Sun Sep 04 19:44:49 2022 +0200
tdf#150773: Avoid bringing loading files to front several times
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139362

However, resolved in recent trunk build:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: b860aea9d6f8ac46f6d2575ead25337495ec9a88
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Bibisected the fix with linux-64-24.8 to the very recent:

commit e0b930e1ddf008d202c3620fdc6652483f914835
author	Vasily Melenchuk 	Sat Apr 27 14:14:04 2024 +0200
committer	Samuel Mehrbrodt 	Thu May 16 12:50:31 2024 +0200
VCL: Windows: more usecases for FlashWindow() API to inform on changes
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166615

Thanks Vasily!