Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auto windowId = X11Wrapper::getActiveWindowId();
- auto windowRect = X11Wrapper::getWindowRect(windowId);
- auto connection = QX11Info::connection();
- xcb_get_property_cookie_t cookie;
- xcb_get_property_reply_t *reply;
- xcb_intern_atom_cookie_t atom_cookie;
- xcb_intern_atom_reply_t *atom_reply;
- atom_cookie = xcb_intern_atom(connection, 0, strlen("_GTK_FRAME_EXTENTS"), "_GTK_FRAME_EXTENTS");
- if ((atom_reply = xcb_intern_atom_reply(connection, atom_cookie, nullptr))) {
- printf("The _GTK_FRAME_EXTENTS atom has ID %u\n", atom_reply->atom);
- }
- cookie = xcb_get_property(connection, 0, windowId, atom_reply->atom, XCB_ATOM_CARDINAL, 0, 4);
- qDebug("Checking reply");
- if ((reply = xcb_get_property_reply(connection, cookie, nullptr))) {
- int len = xcb_get_property_value_length(reply);
- if (len == 0) {
- printf("Length zero\n");
- } else {
- printf("_GTK_FRAME_EXTENTS is %.*s\n", len, (char*)xcb_get_property_value(reply));
- }
- }
- free(reply);
- free(atom_reply);
Add Comment
Please, Sign In to add comment