mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:39:25 +02:00
gtk2 intf: use Set8087CW in AppInit to avoid crash on ubuntu human theme
git-svn-id: trunk@15753 -
This commit is contained in:
parent
f181d04615
commit
976269a47b
@ -562,9 +562,10 @@ end;
|
|||||||
procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);
|
procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);
|
||||||
begin
|
begin
|
||||||
inherited AppInit(ScreenInfo);
|
inherited AppInit(ScreenInfo);
|
||||||
{$ifdef Windows}
|
{$if defined(cpui386) or defined(cpux86_64)}
|
||||||
|
// needed otherwise some gtk theme engines crash with division by zero
|
||||||
Set8087CW($133F);
|
Set8087CW($133F);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGtk2WidgetSet.AppHandle: Thandle;
|
function TGtk2WidgetSet.AppHandle: Thandle;
|
||||||
|
@ -364,7 +364,7 @@ begin
|
|||||||
if not WSCheckHandleAllocated(ATrackBar, 'SetPosition') then
|
if not WSCheckHandleAllocated(ATrackBar, 'SetPosition') then
|
||||||
Exit;
|
Exit;
|
||||||
Range := PGtkRange(ATrackBar.Handle);
|
Range := PGtkRange(ATrackBar.Handle);
|
||||||
gtk_range_set_value(Range, Trunc(NewPosition));
|
gtk_range_set_value(Range, NewPosition);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtk2WSProgressBar }
|
{ TGtk2WSProgressBar }
|
||||||
|
Loading…
Reference in New Issue
Block a user