mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:19:28 +02:00
LCL: Fix TGtk2WidgetSet.AppInit. Issue #26649, patch from ocean.
git-svn-id: trunk@46104 -
This commit is contained in:
parent
f1bdd969f5
commit
9d30244f6a
@ -1037,6 +1037,13 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);
|
procedure TGtk2WidgetSet.AppInit(var ScreenInfo: TScreenInfo);
|
||||||
begin
|
begin
|
||||||
|
{$if defined(cpui386) or defined(cpux86_64)}
|
||||||
|
// needed otherwise some gtk theme engines crash with division by zero
|
||||||
|
{$IFNDEF DisableGtkDivZeroFix}
|
||||||
|
SetExceptionMask(GetExceptionMask + [exOverflow,exZeroDivide,exInvalidOp]);
|
||||||
|
{$ENDIF}
|
||||||
|
{$ifend}
|
||||||
|
|
||||||
InitKeyboardTables;
|
InitKeyboardTables;
|
||||||
{ Compute pixels per inch variable }
|
{ Compute pixels per inch variable }
|
||||||
ScreenInfo.PixelsPerInchX :=
|
ScreenInfo.PixelsPerInchX :=
|
||||||
@ -1044,17 +1051,6 @@ begin
|
|||||||
ScreenInfo.PixelsPerInchY :=
|
ScreenInfo.PixelsPerInchY :=
|
||||||
RoundToInt(gdk_screen_height / (GetScreenHeightMM / 25.4));
|
RoundToInt(gdk_screen_height / (GetScreenHeightMM / 25.4));
|
||||||
ScreenInfo.ColorDepth := gdk_visual_get_system^.depth;
|
ScreenInfo.ColorDepth := gdk_visual_get_system^.depth;
|
||||||
|
|
||||||
{$if defined(cpui386) or defined(cpux86_64)}
|
|
||||||
// needed otherwise some gtk theme engines crash with division by zero
|
|
||||||
{$IFNDEF DisableGtkDivZeroFix}
|
|
||||||
{$IFDEF windows}
|
|
||||||
Set8087CW($133F);
|
|
||||||
{$ELSE}
|
|
||||||
SetExceptionMask(GetExceptionMask + [exZeroDivide,exInvalidOp]);
|
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
|
||||||
{$ifend}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGtk2WidgetSet.AppBringToFront;
|
procedure TGtk2WidgetSet.AppBringToFront;
|
||||||
|
Loading…
Reference in New Issue
Block a user