diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-08 23:03:28 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-09 19:04:51 +0100 |
commit | 028a5259861ee8b2e922008f362eb3906a2d0b36 (patch) | |
tree | afc34635265734dca496b17212de548f93016232 /sw/source/ui/vba/vbacontentcontrol.cxx | |
parent | fe192195566d4de2939827a66ec521b341aa16c6 (diff) |
tdf#130857 qt weld: Signal container focus on window (de)activation
Set QtInstanceWindow as an event filter for it's
QWidget, and call `signal_container_focus_changed`
when receiving a QEvent::WindowActivate or QEvent::WindowDeactivate
event.
This code path got triggered as expected in a
quick test switching between e.g. the "Help" -> "About"
dialog and other windows in KDE Plasma using the Alt+Tab
shortcut.
The VCL implementation does something similar by
handling VclEventId::WindowActivate and
VclEventId::WindowDeactivate events, see
SalInstanceContainer::HandleEventListener.
For non-top-level containers, a different solution
will probably be needed.
For now, adjust the assert in
QtInstanceContainer::connect_container_focus_changed
to only trigger for non-QtInstanceWindow containers.
And call the base class implementation, so that the
handler is actually set for the QtInstanceWindow
case.
A potential solution for QtInstanceContainer
might be to connect to the QApplication::focusChanged
signal in QtInstanceContainer::connect_container_focus_changed
and in the slot check whether exactly one of the old and
new focus widgets has the container's widget in
hierarchy.
Change-Id: I945c8bf0999d93ae91cf25dcffd3fd3ce164d214
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176302
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/vba/vbacontentcontrol.cxx')
0 files changed, 0 insertions, 0 deletions