mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 01:02:39 +02:00
gtk1: fixed GetCursorPos
git-svn-id: trunk@16103 -
This commit is contained in:
parent
1140b0a1e3
commit
b340abac03
@ -4956,7 +4956,7 @@ var
|
|||||||
winx, winy: Integer;
|
winx, winy: Integer;
|
||||||
xmask: Cardinal;
|
xmask: Cardinal;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := true;
|
||||||
if (not MousePositionValid) or (Abs(MousePositionTime-Now)>1/864000) then
|
if (not MousePositionValid) or (Abs(MousePositionTime-Now)>1/864000) then
|
||||||
begin
|
begin
|
||||||
// querying the X cursor is expensive (especially on network connections)
|
// querying the X cursor is expensive (especially on network connections)
|
||||||
@ -4968,7 +4968,6 @@ begin
|
|||||||
dpy := gdk_display;
|
dpy := gdk_display;
|
||||||
XQueryPointer(dpy, RootWindow(dpy, DefaultScreen(dpy)), @root, @child,
|
XQueryPointer(dpy, RootWindow(dpy, DefaultScreen(dpy)), @root, @child,
|
||||||
@MousePosition.X,@MousePosition.Y,@winx,@winy,@xmask);
|
@MousePosition.X,@MousePosition.Y,@winx,@winy,@xmask);
|
||||||
Result := True;
|
|
||||||
{$IFDEF DebugGDKTraps}
|
{$IFDEF DebugGDKTraps}
|
||||||
finally
|
finally
|
||||||
EndGDKErrorTrap;
|
EndGDKErrorTrap;
|
||||||
|
Loading…
Reference in New Issue
Block a user