Skip to content

Commit 759b678

Browse files
committed
[squashme] disable xkb x11 extension
1 parent 50f5deb commit 759b678

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

build-qt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ base_features='
7171
-DFEATURE_draganddrop=OFF
7272
-DFEATURE_dtls=OFF
7373
-DFEATURE_easingcurve=ON
74+
-DFEATURE_evdev=OFF
7475
-DFEATURE_filedialog=OFF
7576
-DFEATURE_filesystemmodel=OFF
7677
-DFEATURE_filesystemwatcher=OFF

qtbase.patch

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,51 @@ diff -u -r qtbase.old/cmake/QtBuildHelpers.cmake qtbase.new/cmake/QtBuildHelpers
2121
qt_internal_set_link_depends_no_shared()
2222
qt_internal_setup_default_install_prefix()
2323
qt_internal_set_qt_source_tree_var()
24+
diff -u -r qtbase.old/src/plugins/platforms/xcb/qxcbconnection_basic.cpp qtbase.new/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
25+
--- qtbase.old/src/plugins/platforms/xcb/qxcbconnection_basic.cpp 2025-02-13 11:45:28.000000000 -0600
26+
+++ qtbase.new/src/plugins/platforms/xcb/qxcbconnection_basic.cpp 2025-11-23 02:23:12.697507021 -0600
27+
@@ -361,6 +361,9 @@
28+
29+
void QXcbBasicConnection::initializeXKB()
30+
{
31+
+ // Disable the xkb extension. This prevents a dependency on libx11-xkbcommon.so.
32+
+ // Drawback: text can't be selected by shift + arrow keys
33+
+ return;
34+
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xkb_id);
35+
if (!reply || !reply->present) {
36+
qCWarning(lcQpaXcb, "XKeyboard extension not present on the X server");
37+
diff -u -r qtbase.old/src/plugins/platforms/xcb/qxcbconnection_basic.h qtbase.new/src/plugins/platforms/xcb/qxcbconnection_basic.h
38+
--- qtbase.old/src/plugins/platforms/xcb/qxcbconnection_basic.h 2025-02-13 11:45:28.000000000 -0600
39+
+++ qtbase.new/src/plugins/platforms/xcb/qxcbconnection_basic.h 2025-11-23 01:31:27.807403222 -0600
40+
@@ -48,7 +48,7 @@
41+
bool hasXShape() const { return m_hasXhape; }
42+
bool hasXRandr() const { return m_hasXRandr; }
43+
bool hasInputShape() const { return m_hasInputShape; }
44+
- bool hasXKB() const { return m_hasXkb; }
45+
+ bool hasXKB() const { return false; }
46+
bool hasXRender(int major = -1, int minor = -1) const {
47+
if (m_hasXRender && major != -1 && minor != -1)
48+
return m_xrenderVersion >= std::pair(major, minor);
2449
diff -u -r qtbase.old/src/tools/rcc/rcc.cpp qtbase.new/src/tools/rcc/rcc.cpp
2550
--- qtbase.old/src/tools/rcc/rcc.cpp 2025-02-13 11:45:28.000000000 -0600
26-
+++ qtbase.new/src/tools/rcc/rcc.cpp 2025-11-14 00:12:48.076214506 -0600
51+
+++ qtbase.new/src/tools/rcc/rcc.cpp 2025-11-23 02:47:34.103288435 -0600
2752
@@ -32,7 +32,7 @@
2853
CONSTANT_COMPRESSLEVEL_DEFAULT = -1,
2954
CONSTANT_ZSTDCOMPRESSLEVEL_CHECK = 1, // Zstd level to check if compressing is a good idea
3055
CONSTANT_ZSTDCOMPRESSLEVEL_STORE = 14, // Zstd level to actually store the data
3156
- CONSTANT_COMPRESSTHRESHOLD_DEFAULT = 70
32-
+ CONSTANT_COMPRESSTHRESHOLD_DEFAULT = 1
57+
+ CONSTANT_COMPRESSTHRESHOLD_DEFAULT = 1 // compress if savings are at least 1%
3358
};
3459

3560
void RCCResourceLibrary::write(const char *str, int len)
3661
diff -u -r qtbase.old/src/tools/uic/CMakeLists.txt qtbase.new/src/tools/uic/CMakeLists.txt
3762
--- qtbase.old/src/tools/uic/CMakeLists.txt 2025-02-13 11:45:28.000000000 -0600
38-
+++ qtbase.new/src/tools/uic/CMakeLists.txt 2025-11-16 23:07:55.067139397 -0600
63+
+++ qtbase.new/src/tools/uic/CMakeLists.txt 2025-11-23 02:24:23.896939637 -0600
3964
@@ -4,6 +4,7 @@
4065
#####################################################################
4166
## uic Tool:
4267
#####################################################################
43-
+return()
68+
+return() # prevent build error
4469

4570
qt_get_tool_target_name(target_name uic)
4671
qt_internal_add_tool(${target_name}

0 commit comments

Comments
 (0)