mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 20:18:34 +02:00
Qt5: pass MouseUp event from transparent widget to the LCL. part of issue #30232
git-svn-id: trunk@53819 -
This commit is contained in:
parent
221dce6d01
commit
047946fc48
@ -3577,6 +3577,16 @@ begin
|
||||
{TODO: check what happens if pure form is transparent for mouse events.}
|
||||
QCoreApplication_sendEvent(AWidgetAt, ANewEvent);
|
||||
QEvent_destroy(ANewEvent);
|
||||
{if our transparent widget is hidden during mouse down, send mouse up to current
|
||||
widget}
|
||||
if not QWidget_isVisible(QWidgetH(Sender)) and (QEvent_type(Event)=QEventMouseButtonPress) then
|
||||
begin
|
||||
ANewEvent := QMouseEvent_create(QEventMouseButtonRelease, @APosF,
|
||||
@AGlobalPosF, QMouseEvent_button(AMouseEvent),
|
||||
QMouseEvent_buttons(AMouseEvent), QInputEvent_modifiers(QInputEventH(Event)));
|
||||
QCoreApplication_sendEvent(AWidgetAt, ANewEvent);
|
||||
QEvent_destroy(ANewEvent);
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user