xcb: Use the correct property type when requesting virtual roots
Virtual roots are windows, so we should request XCB_ATOM_WINDOW instead of XCB_ATOM_ATOM. Change-Id: I59558b1a3c37cb9bcad42bc0695d420f59088eb9 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
72bd5d1db9
commit
30c8e845be
@ -94,14 +94,14 @@ void QXcbWMSupport::updateVirtualRoots()
|
||||
int offset = 0;
|
||||
int remaining = 0;
|
||||
do {
|
||||
xcb_get_property_cookie_t cookie = xcb_get_property(xcb_connection(), false, root, atom(QXcbAtom::_NET_VIRTUAL_ROOTS), XCB_ATOM_ATOM, offset, 1024);
|
||||
xcb_get_property_cookie_t cookie = xcb_get_property(xcb_connection(), false, root, atom(QXcbAtom::_NET_VIRTUAL_ROOTS), XCB_ATOM_WINDOW, offset, 1024);
|
||||
xcb_get_property_reply_t *reply = xcb_get_property_reply(xcb_connection(), cookie, NULL);
|
||||
if (!reply)
|
||||
break;
|
||||
|
||||
remaining = 0;
|
||||
|
||||
if (reply->type == XCB_ATOM_ATOM && reply->format == 32) {
|
||||
if (reply->type == XCB_ATOM_WINDOW && reply->format == 32) {
|
||||
int len = xcb_get_property_value_length(reply)/sizeof(xcb_window_t);
|
||||
xcb_window_t *roots = (xcb_window_t *)xcb_get_property_value(reply);
|
||||
int s = net_virtual_roots.size();
|
||||
|
Loading…
Reference in New Issue
Block a user