diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-01-20 09:54:21 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-01-26 10:48:21 +0100 |
commit | a61d537f0535308fe30494e7a8fa283dba13d72d (patch) | |
tree | ef4ec774caf565f309fdcc12bcc99e53e72f55d5 /src/plugins/platforms/xcb | |
parent | 75ae8869fb171493e4d5163910ef3a2034902c7d (diff) |
xcb: Fix QXcbCursor for secondary screen
QXcbCursor is created for each screen in a multiscreen setup. Make sure
xcb cursor context is created for all QXcbCursor instances otherwise
xcb can't load cursor for non-primary screens.
Amends commit 012132c60d625b2de0039bdda3c22a0a8fe2dfe5
Pick-to: 6.5
Fixes: QTBUG-110434
Change-Id: I85da73a1069b681437b29c3e272d85f5d2dde130
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbcursor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index 6e847ceeec..8f087edc9b 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -258,14 +258,14 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) m_bitmapCache.setMaxCost(8); #endif + updateContext(); + if (cursorCount++) return; cursorFont = xcb_generate_id(xcb_connection()); const char *cursorStr = "cursor"; xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr); - - updateContext(); } QXcbCursor::~QXcbCursor() |