mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 08:59:13 +02:00
Qt: optimize qtwinapi function WindowFromPoint() - QApplication_widgetAt() is slower than QApplication_topLevelAt().
git-svn-id: trunk@18544 -
This commit is contained in:
parent
a5504d7d46
commit
ad8694a8b2
@ -4915,15 +4915,11 @@ end;
|
|||||||
function TQtWidgetSet.WindowFromPoint(Point: TPoint): HWND;
|
function TQtWidgetSet.WindowFromPoint(Point: TPoint): HWND;
|
||||||
var
|
var
|
||||||
Widget: QWidgetH;
|
Widget: QWidgetH;
|
||||||
APoint: TQtPoint;
|
|
||||||
begin
|
begin
|
||||||
APoint := QtPoint(Point.x, Point.y);
|
Widget := QApplication_topLevelAt(Point.x, Point.y);
|
||||||
Widget := QApplication_widgetAt(@APoint);
|
|
||||||
if Widget <> nil then
|
if Widget <> nil then
|
||||||
begin
|
Result := HWND(QtObjectFromWidgetH(Widget))
|
||||||
Widget := QWidget_window(Widget);
|
else
|
||||||
Result := HWND(QtObjectFromWidgetH(Widget));
|
|
||||||
end else
|
|
||||||
Result := 0;
|
Result := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user