Commit 30c8e845 authored by Alexander Volkov's avatar Alexander Volkov
Browse files

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: default avatarUli Schlachter <psychon@znc.in>
Reviewed-by: default avatarLars Knoll <lars.knoll@theqtcompany.com>
Showing with 2 additions and 2 deletions
...@@ -94,14 +94,14 @@ void QXcbWMSupport::updateVirtualRoots() ...@@ -94,14 +94,14 @@ void QXcbWMSupport::updateVirtualRoots()
int offset = 0; int offset = 0;
int remaining = 0; int remaining = 0;
do { 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); xcb_get_property_reply_t *reply = xcb_get_property_reply(xcb_connection(), cookie, NULL);
if (!reply) if (!reply)
break; break;
remaining = 0; 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); int len = xcb_get_property_value_length(reply)/sizeof(xcb_window_t);
xcb_window_t *roots = (xcb_window_t *)xcb_get_property_value(reply); xcb_window_t *roots = (xcb_window_t *)xcb_get_property_value(reply);
int s = net_virtual_roots.size(); int s = net_virtual_roots.size();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment