mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 02:39:23 +02:00
LCL: temporary debug messages for QT to find the cause for an access violation.
git-svn-id: trunk@38912 -
This commit is contained in:
parent
0e8eb89d5e
commit
e08a18840b
@ -3418,6 +3418,9 @@ var
|
|||||||
SenderWidget: QWidgetH;
|
SenderWidget: QWidgetH;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
{$IFDEF TestMouseMoveCrash}
|
||||||
|
DebugLn('TQtWidget.SlotMouseMove: start');
|
||||||
|
{$ENDIF}
|
||||||
if not CanSendLCLMessage or (Sender = nil) or
|
if not CanSendLCLMessage or (Sender = nil) or
|
||||||
not QObject_isWidgetType(Sender) then
|
not QObject_isWidgetType(Sender) then
|
||||||
Exit(True);
|
Exit(True);
|
||||||
@ -3433,11 +3436,9 @@ begin
|
|||||||
|
|
||||||
// get parent form, so check if mouse is out of parent form first.
|
// get parent form, so check if mouse is out of parent form first.
|
||||||
W := QWidget_window(SenderWidget);
|
W := QWidget_window(SenderWidget);
|
||||||
|
|
||||||
if W <> nil then
|
if W <> nil then
|
||||||
begin
|
begin
|
||||||
QWidget_frameGeometry(W, @R);
|
QWidget_frameGeometry(W, @R);
|
||||||
|
|
||||||
// exclude borders from frame
|
// exclude borders from frame
|
||||||
FrameBorder := GetPixelMetric(QStylePM_DefaultFrameWidth, nil, W);
|
FrameBorder := GetPixelMetric(QStylePM_DefaultFrameWidth, nil, W);
|
||||||
TitleBarHeight := GetPixelMetric(QStylePM_TitleBarHeight, nil, W);
|
TitleBarHeight := GetPixelMetric(QStylePM_TitleBarHeight, nil, W);
|
||||||
@ -3477,9 +3478,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
FillChar(Msg, SizeOf(Msg), #0);
|
FillChar(Msg, SizeOf(Msg), #0);
|
||||||
|
|
||||||
|
{$IFDEF TestMouseMoveCrash}
|
||||||
|
DebugLn('TQtWidget.SlotMouseMove: before QMouseEvent_pos');
|
||||||
|
{$ENDIF}
|
||||||
MousePos := QMouseEvent_pos(QMouseEventH(Event))^;
|
MousePos := QMouseEvent_pos(QMouseEventH(Event))^;
|
||||||
|
{$IFDEF TestMouseMoveCrash}
|
||||||
|
DebugLn('TQtWidget.SlotMouseMove: after QMouseEvent_pos');
|
||||||
|
{$ENDIF}
|
||||||
OffsetMousePos(@MousePos);
|
OffsetMousePos(@MousePos);
|
||||||
|
{$IFDEF TestMouseMoveCrash}
|
||||||
|
DebugLn('TQtWidget.SlotMouseMove: after OffsetMousePos');
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Msg.XPos := SmallInt(MousePos.X);
|
Msg.XPos := SmallInt(MousePos.X);
|
||||||
Msg.YPos := SmallInt(MousePos.Y);
|
Msg.YPos := SmallInt(MousePos.Y);
|
||||||
@ -3492,6 +3502,9 @@ begin
|
|||||||
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
NotifyApplicationUserInput(LCLObject, Msg.Msg);
|
||||||
DeliverMessage(Msg);
|
DeliverMessage(Msg);
|
||||||
SetNoMousePropagation(SenderWidget, True);
|
SetNoMousePropagation(SenderWidget, True);
|
||||||
|
{$IFDEF TestMouseMoveCrash}
|
||||||
|
DebugLn('TQtWidget.SlotMouseMove: end');
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user