summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xkbcommon/src/x11/x11-state.c
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-11-16 17:07:33 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2018-11-30 09:47:03 +0000
commitc3a963da1f9e7b1d37e63eedded61da4fbdaaf9a (patch)
treeabe3ac72e69cd6e85ec3a4cfb587405151076493 /src/3rdparty/xkbcommon/src/x11/x11-state.c
parent1f1dc3fc4c2e5e2d94e86dfc7235a4b762da2e72 (diff)
src/3rdparty: remove xkbcommon
The only reason why we bundled this library ~6 years ago was because it was not available on distributions that we supported at the time, but library was a hard dependency for XCB plugin. See: 2122e731abdb619249df89642c0800640b2fa428 Later more and more projects started to depend on it (compose input context plugin, libinput, mir, wayland). The configuration had become too complex, because some projects used bundled and some used the version from the system. Having libxkbcommon in 3rdparty sources is not necessary anymore, after RHEL 6.6 was removed from the list of supported platforms for Qt 5.12. Ubuntu 16.04 - 0.5.0 Ubuntu 18.04 - 0.8.0 openSUSE 42.3 - 0.6.1 RHEL-7.4 - 0.7.1 This will also simplify further development, e.g. QTBUG-42181 Bumped the minimal required version 0.4.1 -> 0.5.0. The patch also contains a code marked with "TRANSITION HACK", which is temporary needed so we can update the dependent wayland module. [ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources. This library is present on all supported platforms. The minimal required version now is 0.5.0. Task-number: QTBUG-65503 Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/3rdparty/xkbcommon/src/x11/x11-state.c')
-rw-r--r--src/3rdparty/xkbcommon/src/x11/x11-state.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/3rdparty/xkbcommon/src/x11/x11-state.c b/src/3rdparty/xkbcommon/src/x11/x11-state.c
deleted file mode 100644
index da7dcc23c2..0000000000
--- a/src/3rdparty/xkbcommon/src/x11/x11-state.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright © 2013 Ran Benita
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "x11-priv.h"
-
-static bool
-update_initial_state(struct xkb_state *state, xcb_connection_t *conn,
- uint16_t device_id)
-{
- xcb_xkb_get_state_cookie_t cookie =
- xcb_xkb_get_state(conn, device_id);
- xcb_xkb_get_state_reply_t *reply =
- xcb_xkb_get_state_reply(conn, cookie, NULL);
-
- if (!reply)
- return false;
-
- xkb_state_update_mask(state,
- reply->baseMods,
- reply->latchedMods,
- reply->lockedMods,
- reply->baseGroup,
- reply->latchedGroup,
- reply->lockedGroup);
-
- free(reply);
- return true;
-}
-
-XKB_EXPORT struct xkb_state *
-xkb_x11_state_new_from_device(struct xkb_keymap *keymap,
- xcb_connection_t *conn, int32_t device_id)
-{
- struct xkb_state *state;
-
- if (device_id < 0 || device_id > 255) {
- log_err_func(keymap->ctx, "illegal device ID: %d", device_id);
- return NULL;
- }
-
- state = xkb_state_new(keymap);
- if (!state)
- return NULL;
-
- if (!update_initial_state(state, conn, device_id)) {
- xkb_state_unref(state);
- return NULL;
- }
-
- return state;
-}