lcl: fix compilation under windows

git-svn-id: trunk@20934 -
This commit is contained in:
paul 2009-07-24 13:42:38 +00:00
parent f0f908b584
commit c907579c4c
2 changed files with 10 additions and 9 deletions

View File

@ -35,13 +35,6 @@
{$define RawimageConsistencyChecks} {$define RawimageConsistencyChecks}
(*
GTK or GNOME has problems reporting ssAlt and ssAltGr when different
keyboardlayouts are used. With UseOwnShiftState we keep track of the shiftate
ourself
*)
{$define UseOwnShiftState}
(* (*
keep track of keystates instead of using OS keep track of keystates instead of using OS
This is the old mode and might be removed This is the old mode and might be removed
@ -88,6 +81,14 @@
{$define GTK_2_10} {$define GTK_2_10}
{$endif} {$endif}
{$ifdef HasX}
(*
GTK or GNOME has problems reporting ssAlt and ssAltGr when different
keyboardlayouts are used. With UseOwnShiftState we keep track of the shiftate
ourself
*)
{$define UseOwnShiftState}
{$endif}
{$IFDEF Gtk2} {$IFDEF Gtk2}
// see http://bugs.freepascal.org/view.php?id=12145. // see http://bugs.freepascal.org/view.php?id=12145.

View File

@ -3470,8 +3470,8 @@ function GTKEventStateToShiftState(KeyState: Word): TShiftState;
function GetState: TShiftState; function GetState: TShiftState;
begin begin
Result := []; Result := [];
if GetKeyState(VK_ALT) < 0 then Include(Result, ssAlt); if GetKeyState(VK_MENU) < 0 then Include(Result, ssAlt);
if GetKeyState(VK_WIN) < 0 then Include(Result, ssMeta); if (GetKeyState(VK_LWIN) < 0) or (GetKeyState(VK_RWIN) < 0) then Include(Result, ssMeta);
end; end;
{$else} {$else}
function GetState: TShiftState; function GetState: TShiftState;