mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
Qt: included xkblib after codetools fix in r40762 #006205e9c2
git-svn-id: trunk@40765 -
This commit is contained in:
parent
1c03450e8b
commit
541e7293b1
@ -289,7 +289,7 @@ uses
|
||||
// uncomment only those units with implementation
|
||||
////////////////////////////////////////////////////
|
||||
{$IFDEF HASX11}
|
||||
XAtom, X, XLib,
|
||||
XAtom, X, XLib, XKB, xkblib,
|
||||
{$ENDIF}
|
||||
QtWSFactory,
|
||||
QtCaret,
|
||||
|
@ -256,11 +256,6 @@ begin
|
||||
@Xclient);
|
||||
end;
|
||||
|
||||
{$warning xkblib is not included because of codetools errors. When codetools
|
||||
are fixed remove this and include xkblib.}
|
||||
function XkbGetIndicatorState (dpy : PDisplay; deviceSpec : Word; pStateRtrn : PWord) : TStatus;
|
||||
cdecl; external libX11 name 'XkbGetIndicatorState';
|
||||
|
||||
function GetKeyLockState(const AKey: Byte): Boolean;
|
||||
var
|
||||
Display: PDisplay;
|
||||
@ -271,8 +266,8 @@ begin
|
||||
|
||||
if (Display = nil) then
|
||||
exit;
|
||||
// to avoid XKB unit inclusion XkbUseCoreKbd = $0100;
|
||||
if (XkbGetIndicatorState(Display, $0100, @n) = Success) then
|
||||
|
||||
if (XkbGetIndicatorState(Display, XkbUseCoreKbd, @n) = Success) then
|
||||
begin
|
||||
if (AKey = VK_LCL_CAPSLOCK) then
|
||||
Result := (n and $01) = 1
|
||||
|
Loading…
Reference in New Issue
Block a user