Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 751 Lines • ▼ Show 20 Line(s) | 751 | if (toplevel->shape()) { | |||
---|---|---|---|---|---|
752 | auto cookie = xcb_shape_get_rectangles_unchecked(connection(), toplevel->frameId(), XCB_SHAPE_SK_BOUNDING); | 752 | auto cookie = xcb_shape_get_rectangles_unchecked(connection(), toplevel->frameId(), XCB_SHAPE_SK_BOUNDING); | ||
753 | ScopedCPointer<xcb_shape_get_rectangles_reply_t> reply(xcb_shape_get_rectangles_reply(connection(), cookie, nullptr)); | 753 | ScopedCPointer<xcb_shape_get_rectangles_reply_t> reply(xcb_shape_get_rectangles_reply(connection(), cookie, nullptr)); | ||
754 | if (!reply.isNull()) { | 754 | if (!reply.isNull()) { | ||
755 | shape_region = QRegion(); | 755 | shape_region = QRegion(); | ||
756 | auto *rects = xcb_shape_get_rectangles_rectangles(reply.data()); | 756 | auto *rects = xcb_shape_get_rectangles_rectangles(reply.data()); | ||
757 | for (int i = 0; | 757 | for (int i = 0; | ||
758 | i < xcb_shape_get_rectangles_rectangles_length(reply.data()); | 758 | i < xcb_shape_get_rectangles_rectangles_length(reply.data()); | ||
759 | ++i) | 759 | ++i) | ||
760 | shape_region += QRegion(rects[ i ].x, rects[ i ].y, | 760 | shape_region += QRegion(Xcb::scK(rects[ i ].x), Xcb::scK(rects[ i ].y), | ||
761 | rects[ i ].width, rects[ i ].height); | 761 | Xcb::scK(rects[ i ].width), Xcb::scK(rects[ i ].height)); | ||
762 | // make sure the shape is sane (X is async, maybe even XShape is broken) | 762 | // make sure the shape is sane (X is async, maybe even XShape is broken) | ||
763 | shape_region &= QRegion(0, 0, width(), height()); | 763 | shape_region &= QRegion(0, 0, width(), height()); | ||
764 | } else | 764 | } else | ||
765 | shape_region = QRegion(); | 765 | shape_region = QRegion(); | ||
766 | } else | 766 | } else | ||
767 | shape_region = QRegion(0, 0, width(), height()); | 767 | shape_region = QRegion(0, 0, width(), height()); | ||
768 | shape_valid = true; | 768 | shape_valid = true; | ||
769 | } | 769 | } | ||
▲ Show 20 Lines • Show All 386 Lines • Show Last 20 Lines |