mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:19:36 +02:00
cocoa: cleaning up compiler warnings
git-svn-id: trunk@58833 -
This commit is contained in:
parent
7f94fae32a
commit
8032ce639a
@ -164,6 +164,7 @@ begin
|
||||
Result := 0
|
||||
else
|
||||
begin
|
||||
Result := 0; // getting rid of compiler warning
|
||||
for y := 0 to ImageRep.pixelsHigh - 1 do
|
||||
for x := 0 to ImageRep.pixelsWide - 1 do
|
||||
begin
|
||||
|
@ -2089,6 +2089,7 @@ var
|
||||
lView: NSView;
|
||||
begin
|
||||
Obj := NSObject(Handle);
|
||||
Result := 0; // should return 0, if function fails
|
||||
if Assigned(Obj) and NSApp.isActive then
|
||||
begin
|
||||
Result := HWND(NSApp.keyWindow);
|
||||
@ -2098,9 +2099,7 @@ begin
|
||||
begin
|
||||
lView := GetNSObjectView(Obj);
|
||||
if lView <> nil then
|
||||
lView.window.makeKeyWindow
|
||||
else
|
||||
Result := 0;
|
||||
lView.window.makeKeyWindow;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -1138,6 +1138,8 @@ begin
|
||||
// the window doesn't have screen assigned.
|
||||
// figuring out the placement based of the Left/Top of the rect
|
||||
// and NSrects;
|
||||
fnd := false;
|
||||
srect := NSMakeRect(0,0,0,0); // making the compiler happy
|
||||
p.x:=r.Left;
|
||||
p.y:=r.Top;
|
||||
for sc in NSScreen.screens do begin
|
||||
|
@ -784,6 +784,10 @@ begin
|
||||
SendChar := False;
|
||||
VKKeyCode := VK_UNKNOWN;
|
||||
|
||||
UTF8Character := '';
|
||||
KeyChar := #0;
|
||||
VKKeyChar := #0;
|
||||
|
||||
IsSysKey := (Event.modifierFlags and NSCommandKeyMask) <> 0;
|
||||
KeyData := (Ord(Event.isARepeat) + 1) or Event.keyCode shl 16;
|
||||
if (Event.modifierFlags and NSAlternateKeyMask) <> 0 then
|
||||
@ -934,8 +938,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TLCLCommonCallback.KeyEvBeforeDown(var AllowCocoaHandle: boolean);
|
||||
var
|
||||
OrigChar: AnsiString;
|
||||
begin
|
||||
// create the CN_KEYDOWN message
|
||||
if _IsSysKey then
|
||||
@ -979,7 +981,6 @@ begin
|
||||
|
||||
|
||||
// send the UTF8 keypress
|
||||
OrigChar := _UTF8Character;
|
||||
if Target.IntfUTF8KeyPress(_UTF8Character, 1, _IsSysKey) then
|
||||
begin
|
||||
// the LCL has handled the key
|
||||
|
Loading…
Reference in New Issue
Block a user