mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 01:09:39 +02:00
cocoa: update clientToScreen to respect content view #33046. Recognizing flipped views
git-svn-id: trunk@57170 -
This commit is contained in:
parent
1c46505f21
commit
3b93e012cb
@ -3350,7 +3350,11 @@ var
|
||||
begin
|
||||
// 1. convert to window base
|
||||
P.x := X;
|
||||
P.y := frame.size.height-y; // convert to Cocoa system
|
||||
if isFlipped then
|
||||
p.y := Y
|
||||
else
|
||||
P.y := frame.size.height-y; // convert to Cocoa system
|
||||
|
||||
P := convertPoint_ToView(P, nil);
|
||||
|
||||
X := Round(P.X);
|
||||
|
@ -98,7 +98,8 @@ begin
|
||||
Result := Handle <> 0;
|
||||
|
||||
if Result then
|
||||
NSObject(Handle).lclLocalToScreen(P.X, P.Y);
|
||||
// must use lclContentView! - it's client view
|
||||
NSObject(Handle).lclContentView.lclLocalToScreen(P.X, P.Y);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user