Don't include xkbcommon/xkbcommon.h in input.h, forward-declare instead

Some systems (e.g. openSuSE) don't install the xkbcommon header into
/usr/include/xkbcommon/xkbcommon.h (which is always in the include path),
but instead into a subdirectory, which is in the openSuSE case
/usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon.h. This means that e.g.
kcm_kwinrules will not compile there since it includes input.h

REVIEW: 117069
This commit is contained in:
Alex Richardson 2014-03-28 09:41:48 +01:00
parent d0fb6b22ba
commit 3d9abbe6ff
2 changed files with 9 additions and 3 deletions

View file

@ -30,6 +30,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kkeyserver.h>
// TODO: remove xtest
#include <xcb/xtest.h>
#if HAVE_XKB
#include <xkbcommon/xkbcommon.h>
#endif
// system
#include <linux/input.h>
#include <sys/mman.h>

View file

@ -26,13 +26,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QEvent>
#include <QWeakPointer>
#include <config-kwin.h>
#if HAVE_XKB
#include <xkbcommon/xkbcommon.h>
#endif
class QAction;
class QKeySequence;
struct xkb_context;
struct xkb_keymap;
struct xkb_state;
typedef uint32_t xkb_mod_index_t;
typedef uint32_t xkb_keysym_t;
namespace KWin
{
class GlobalShortcutsManager;