From 541e7293b1ac5c4258e17a6ff0f3a9bbb19a2fed Mon Sep 17 00:00:00 2001 From: zeljko Date: Tue, 9 Apr 2013 15:03:47 +0000 Subject: [PATCH] Qt: included xkblib after codetools fix in r40762 #006205e9c2 git-svn-id: trunk@40765 - --- lcl/interfaces/qt/qtint.pp | 2 +- lcl/interfaces/qt/qtx11.inc | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) 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