diff --git a/lcl/interfaces/qt/qtint.pp b/lcl/interfaces/qt/qtint.pp index 2e618ab202..bd86a710c9 100644 --- a/lcl/interfaces/qt/qtint.pp +++ b/lcl/interfaces/qt/qtint.pp @@ -289,7 +289,7 @@ uses // uncomment only those units with implementation //////////////////////////////////////////////////// {$IFDEF HASX11} - XAtom, X, XLib, + XAtom, X, XLib, XKB, xkblib, {$ENDIF} QtWSFactory, QtCaret, diff --git a/lcl/interfaces/qt/qtx11.inc b/lcl/interfaces/qt/qtx11.inc index 3164417857..479f0de4e6 100644 --- a/lcl/interfaces/qt/qtx11.inc +++ b/lcl/interfaces/qt/qtx11.inc @@ -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