mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 07:10:21 +02:00
* (slightly modified) patch by Laaca originally for GO32v2 - avoid disappearing mouse cursor in full screen sessions
git-svn-id: trunk@10591 -
This commit is contained in:
parent
a71092edb0
commit
ed914574e2
@ -3,7 +3,7 @@
|
|||||||
Copyright (c) 1999-2000 by Florian Klaempfl
|
Copyright (c) 1999-2000 by Florian Klaempfl
|
||||||
member of the Free Pascal development team
|
member of the Free Pascal development team
|
||||||
|
|
||||||
Mouse unit for linux
|
Mouse unit for OS/2
|
||||||
|
|
||||||
See the file COPYING.FPC, included in this distribution,
|
See the file COPYING.FPC, included in this distribution,
|
||||||
for details about the copyright.
|
for details about the copyright.
|
||||||
@ -18,6 +18,9 @@ interface
|
|||||||
|
|
||||||
{$i mouseh.inc}
|
{$i mouseh.inc}
|
||||||
|
|
||||||
|
const
|
||||||
|
MouseIsVisible: boolean = false;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -68,6 +71,7 @@ begin
|
|||||||
*)
|
*)
|
||||||
|
|
||||||
MouDrawPtr (Handle);
|
MouDrawPtr (Handle);
|
||||||
|
MouseIsVisible := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -115,6 +119,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Dec (HideCounter);
|
Dec (HideCounter);
|
||||||
if HideCounter = 0 then MouDrawPtr (Handle);
|
if HideCounter = 0 then MouDrawPtr (Handle);
|
||||||
|
MouseIsVisible := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -134,6 +139,7 @@ begin
|
|||||||
PtrRect.cRow := Pred (ScreenHeight);
|
PtrRect.cRow := Pred (ScreenHeight);
|
||||||
PtrRect.cCol := Pred (ScreenWidth);
|
PtrRect.cCol := Pred (ScreenWidth);
|
||||||
MouRemovePtr (PtrRect, Handle);
|
MouRemovePtr (PtrRect, Handle);
|
||||||
|
MouseIsVisible := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -22,7 +22,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
DosCalls, VioCalls;
|
DosCalls, VioCalls, Mouse;
|
||||||
|
|
||||||
{$i video.inc}
|
{$i video.inc}
|
||||||
|
|
||||||
@ -352,6 +352,7 @@ end;
|
|||||||
procedure SysUpdateScreen (Force: boolean);
|
procedure SysUpdateScreen (Force: boolean);
|
||||||
|
|
||||||
var SOfs, CLen: cardinal;
|
var SOfs, CLen: cardinal;
|
||||||
|
Mouse_Visible: boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not (Force) then
|
if not (Force) then
|
||||||
@ -407,9 +408,14 @@ begin
|
|||||||
Move(VideoBuf^,SysVideoBuf^,VideoBufSize);
|
Move(VideoBuf^,SysVideoBuf^,VideoBufSize);
|
||||||
if Force then
|
if Force then
|
||||||
begin
|
begin
|
||||||
VioShowBuf (SOfs, CLen, 0);
|
Mouse_Visible := MouseIsVisible; {MouseIsVisible is from Mouse unit}
|
||||||
Move (VideoBuf^ [SOfs div SizeOf (TVideoCell)],
|
if Mouse_Visible then
|
||||||
|
HideMouse;
|
||||||
|
VioShowBuf (SOfs, CLen, 0);
|
||||||
|
Move (VideoBuf^ [SOfs div SizeOf (TVideoCell)],
|
||||||
OldVideoBuf^ [SOfs div SizeOf (TVideoCell)], CLen);
|
OldVideoBuf^ [SOfs div SizeOf (TVideoCell)], CLen);
|
||||||
|
if Mouse_Visible then
|
||||||
|
ShowMouse;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user