mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 06:56:10 +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;
|
||||
var
|
||||
Widget: QWidgetH;
|
||||
APoint: TQtPoint;
|
||||
begin
|
||||
APoint := QtPoint(Point.x, Point.y);
|
||||
Widget := QApplication_widgetAt(@APoint);
|
||||
Widget := QApplication_topLevelAt(Point.x, Point.y);
|
||||
if Widget <> nil then
|
||||
begin
|
||||
Widget := QWidget_window(Widget);
|
||||
Result := HWND(QtObjectFromWidgetH(Widget));
|
||||
end else
|
||||
Result := HWND(QtObjectFromWidgetH(Widget))
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user