mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 04:42:11 +02:00
qt:
- install global event filter on all systems (not only win) to catch release events - fix crash in RawImage_FromBitmap git-svn-id: trunk@13738 -
This commit is contained in:
parent
b1c2ed3d9b
commit
f895295167
@ -391,7 +391,9 @@ begin
|
||||
begin
|
||||
WorkMask := TQtImage.Create;
|
||||
WorkMask.CopyFrom(Mask.Handle, ARect.Left, ARect.Top, Width, Height);
|
||||
end;
|
||||
end
|
||||
else
|
||||
WorkMask := nil;
|
||||
end;
|
||||
|
||||
Desc.Width := WorkImage.width;
|
||||
|
@ -104,16 +104,14 @@ begin
|
||||
|
||||
FOldFocusWidget := nil;
|
||||
|
||||
{This hook crashes linux & darwin ocasionally !
|
||||
todo: check what happens with win32
|
||||
and possibly remove this hook at all.
|
||||
Tabs works under linux & darwin without this hook}
|
||||
{$ifdef windows}
|
||||
{
|
||||
check whether this hook crashes on linux & darwin and why it is so
|
||||
we need this hook to catch release messages
|
||||
}
|
||||
// install global event filter
|
||||
FHook := QObject_hook_create(App);
|
||||
TEventFilterMethod(Method) := @EventFilter;
|
||||
QObject_hook_hook_events(FHook, Method);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -266,7 +264,7 @@ begin
|
||||
end;
|
||||
LCLQt_Destroy:
|
||||
begin
|
||||
AObject := TQtObject(QLCLMessageEvent_getWParam(QLCLMessageEventH(Event)));
|
||||
AObject := TQtObject(Pointer(QLCLMessageEvent_getWParam(QLCLMessageEventH(Event))));
|
||||
//WriteLn('Catched free for: ', PtrUInt(AObject), ' : ', AObject.ClassName);
|
||||
AObject.Free;
|
||||
Result := True;
|
||||
|
Loading…
Reference in New Issue
Block a user