gtk2 intf: use Set8087CW in AppInit to avoid crash on ubuntu human theme

git-svn-id: trunk@15753 -
This commit is contained in:
mattias 2008-07-11 17:19:30 +00:00
parent f181d04615
commit 976269a47b
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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 }