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 012132c60d
Pick-to: 6.5
Fixes: QTBUG-110434
Change-Id: I85da73a1069b681437b29c3e272d85f5d2dde130
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
75ae8869fb
commit
a61d537f05
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user