diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-08-30 18:17:53 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-08-31 18:28:36 +0200 |
commit | 1e2836665a1839f61cd8bfa46c54687f010e7e9d (patch) | |
tree | c9045f402d6b6ddae57605cfcb90b7a3a9faffc3 /vcl/inc/salvtables.hxx | |
parent | 5ef991ffc226424a673662b6e478db124825022a (diff) |
tdf#162696 tdf#130857 qt weld: Get parent via SalInstanceWidget
Since only welding for simple message dialogs has been
implemented for the Qt based VCL plugins so far, the
`weld::Widget*` parent passed to `QtInstance::CreateMessageDialog`
is usually not a `QtInstanceWidget`.
The initial implementation to get a parent from
commit 9e40fc8c9458b937200ea56c96b89113c74b67f5
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Feb 14 10:54:59 2024 +0100
tdf#130857 qt weld: Set msg dialog parent
implemented a fallback to use of the currently active
window if no native Qt parent is set.
That is however not sufficient to reliably set the
correct parent for the QMessageBox for the tdf#162696
scenario, where the "Extension" dialog that is the
parent and the message box and the message box itself
are created shortly after each other, and the extension
dialog does not reliably have focus yet when the message
box is created, so the start center window would sometimes
be set as the parent of the message dialog instead.
Adjust the logic to make use of the implementation detail
that non-Qt parents are `SalInstanceWidget`s.
Retrieve a `QWidget` to use as the parent via
the `SalFrame`/`QtFrame` in that case.
This makes setting the correct parent work for both,
the case described in the commit message of the
above-mentioned commit and for the tdf#162696
case, fixing the issue mentioned in tdf#162696#c13:
> One small thing I noticed is that after clicking OK on the warning
> dialog, the Extensions dialog has to be manually brought into focus. So
> it's not layered below the warning dialog during the first installation
> action in a session.
Change-Id: I4de403a8ed78a649a17f6cabc0e0f5fdecae09c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172686
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'vcl/inc/salvtables.hxx')
-rw-r--r-- | vcl/inc/salvtables.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 200e0ef36bf5..ba7653a0fc40 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -183,7 +183,7 @@ public: class SalFlashAttention; -class SalInstanceWidget : public virtual weld::Widget +class VCL_DLLPUBLIC SalInstanceWidget : public virtual weld::Widget { protected: VclPtr<vcl::Window> m_xWidget; |