mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-28 00:03:47 +02:00
gtk2: load custom cursor workaround for windows
git-svn-id: trunk@12684 -
This commit is contained in:
parent
8702a324fd
commit
ad65de5bd4
@ -72,6 +72,11 @@ var
|
||||
MaxWidth, MaxHeight: guint;
|
||||
pixbuf, masked_pixbuf: PGdkPixbuf;
|
||||
begin
|
||||
{$IFDEF windows}
|
||||
// read comments at bottom
|
||||
Result := inherited CreateCursor(ACursorInfo);
|
||||
exit;
|
||||
{$endif}
|
||||
Result := 0;
|
||||
if not IsValidGDIObject(ACursorInfo^.hbmColor) then Exit;
|
||||
|
||||
@ -106,6 +111,7 @@ begin
|
||||
end;
|
||||
|
||||
// create cursor from pixbuf
|
||||
// windows gtk2 crahes here, so it can load cursors at moment through gtk1 code
|
||||
Result := HCursor(PtrUInt(gdk_cursor_new_from_pixbuf(gdk_display_get_default, pixbuf,
|
||||
ACursorInfo^.xHotSpot, ACursorInfo^.yHotSpot)));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user