Bug 115964 - Document password prompt not centered to window with GTK3, when opening file directly
Summary: Document password prompt not centered to window with GTK3, when opening file ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: All All
: low minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.1.0 target:6.3.0
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2018-02-23 13:09 UTC by Alberto Salvia Novella
Modified: 2023-04-05 12:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Secret.odt (12.70 KB, application/vnd.oasis.opendocument.text)
2018-02-24 02:01 UTC, Alberto Salvia Novella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Salvia Novella 2018-02-23 13:09:53 UTC
As reported in to the Deepin Desktop:
(https://github.com/linuxdeepin/deepin-wm/issues/29#issuecomment-367920230)

This is what happens:
(https://youtu.be/pD0QokET0q4)
Comment 1 Xisco Faulí 2018-02-23 15:30:41 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 Alberto Salvia Novella 2018-02-24 02:01:59 UTC
Created attachment 140107 [details]
Secret.odt
Comment 3 Buovjaga 2018-03-07 17:20:52 UTC
Does the same happen if you launch from the command line with
SAL_USE_VCLPLUGIN=gen

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 4 Buovjaga 2018-03-07 17:21:10 UTC
I meant to say
SAL_USE_VCLPLUGIN=gen libreoffice
Comment 5 Alberto Salvia Novella 2018-03-07 17:38:42 UTC
These lead to a centred promp:
SAL_USE_VCLPLUGIN=gen libreoffice
SAL_USE_VCLPLUGIN=gen libreoffice Secret.odt
libreoffice

Only this leads to a defective promp:
libreoffice Secret.odt
Comment 6 Buovjaga 2018-03-07 17:56:05 UTC
So in essence, is your problem about the dialog being under the Deepin dock? Or about not being centered?
Comment 7 Alberto Salvia Novella 2018-03-07 19:28:25 UTC
There are two problems:

1. The dialogue is under the dock
2. The dialogue is positioned differently depending on how libreoffice is launched.
Comment 8 Buovjaga 2018-03-08 10:36:51 UTC
Not sure, if the dock issue is because of LibO or Deepin. I do confirm the non-centering of the prompt with gtk3, so let's keep that.

It can be unintuitive when testing vs. non-gtk3 backends: the window position is sometimes not remembered, so the password prompt is centered in the position where the window should be.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 856c57f20f9b07c686a854e0ccbb6ee3b0ee4791
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 7th 2018
Comment 9 Caolán McNamara 2018-03-16 16:10:12 UTC
caolanm->Buovjaga: I can't reproduce this, but from comment #8 it sounds like you can so I'll convert this password prompt to a native gtk3 dialog and see if that makes a difference in this case.
Comment 10 Commit Notification 2018-03-16 20:33:36 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2f95590f478a68a4de6ef05018785523e46506b

Related: tdf#115964 convert the problematic dialog to a native gtk3 one

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Buovjaga 2018-03-17 10:43:20 UTC
Caolán: sorry for the confusing descriptions etc. Now I figured out the point of the issue: the problem only appears, if you have not opened LibreOffice yet. So if I run with my gtk3 alias:
libogtk3 libobugs/Secret.odt

...I can see the problem. The window opens maximised and the password prompt appears near the top left, its left edge touching the left edge of the screen.

This is still with your patch from yesterday.
Comment 12 Alberto Salvia Novella 2018-03-17 16:01:24 UTC
About the daily builds I see some issues.

First, there's no daily build I can test on Arch Linux:
https://wiki.documentfoundation.org/QA/Testing_Daily_Builds

Second, documentation about how to find the source has a broken link and it's incomplete:
https://wiki.documentfoundation.org/QA/Testing_Daily_Builds#How_to_find_the_source

Third, there's no documentation about how to test by building yourself.
Comment 13 Buovjaga 2018-03-17 16:11:55 UTC
(In reply to Alberto Salvia Novella from comment #12)
> About the daily builds I see some issues.
> 
> First, there's no daily build I can test on Arch Linux:
> https://wiki.documentfoundation.org/QA/Testing_Daily_Builds
> 
> Second, documentation about how to find the source has a broken link and
> it's incomplete:
> https://wiki.documentfoundation.org/QA/
> Testing_Daily_Builds#How_to_find_the_source
> 
> Third, there's no documentation about how to test by building yourself.

Use these instructions to build: https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies#Arch_Linux
Comment 14 Caolán McNamara 2018-03-18 14:06:58 UTC
ah right, I can reproduce with gnome-tweak-tool attach modal dialogs disabled. I imagine the dialog is created after the parent frame is created, but before its given its final size.
Comment 15 Alberto Salvia Novella 2018-04-16 22:08:57 UTC Comment hidden (obsolete)
Comment 16 Buovjaga 2018-04-17 06:06:59 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2019-04-18 03:03:29 UTC Comment hidden (obsolete)
Comment 18 Alberto Salvia Novella 2019-04-18 10:45:04 UTC
Still there in version 6.2.2.2.
Comment 19 Caolán McNamara 2019-04-18 15:21:16 UTC
we recently grew a workaround to this sort of problem where the parent doesn't have its final size at the time of launching the dialog

(to reproduce this its needs to be the X backend, not wayland)
Comment 20 Commit Notification 2019-04-18 20:30:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/5f30114c25f233fee2760645e3b1f194c8157438%5E%21

Resolves: tdf#115964 force password dialog to center on parent size request

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.