utils: Make Xcb::WindowGeometry return native geometry
This commit is contained in:
parent
ccde653ac2
commit
95f56399b8
2 changed files with 8 additions and 8 deletions
|
@ -604,22 +604,22 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
inline QRectF rect()
|
||||
inline QRect rect()
|
||||
{
|
||||
const xcb_get_geometry_reply_t *geometry = data();
|
||||
if (!geometry) {
|
||||
return QRect();
|
||||
}
|
||||
return QRectF(Xcb::fromXNative(geometry->x), Xcb::fromXNative(geometry->y), Xcb::fromXNative(geometry->width), Xcb::fromXNative(geometry->height));
|
||||
return QRect(geometry->x, geometry->y, geometry->width, geometry->height);
|
||||
}
|
||||
|
||||
inline QSizeF size()
|
||||
inline QSize size()
|
||||
{
|
||||
const xcb_get_geometry_reply_t *geometry = data();
|
||||
if (!geometry) {
|
||||
return QSize();
|
||||
}
|
||||
return QSizeF(Xcb::fromXNative(geometry->width), Xcb::fromXNative(geometry->height));
|
||||
return QSize(geometry->width, geometry->height);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -538,9 +538,9 @@ bool X11Window::track(xcb_window_t w)
|
|||
m_client.reset(w, false);
|
||||
|
||||
Xcb::selectInput(w, attr->your_event_mask | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_PROPERTY_CHANGE);
|
||||
m_bufferGeometry = geo.rect();
|
||||
m_frameGeometry = geo.rect();
|
||||
m_clientGeometry = geo.rect();
|
||||
m_bufferGeometry = Xcb::fromXNative(geo.rect());
|
||||
m_frameGeometry = Xcb::fromXNative(geo.rect());
|
||||
m_clientGeometry = Xcb::fromXNative(geo.rect());
|
||||
checkOutput();
|
||||
m_visual = attr->visual;
|
||||
bit_depth = geo->depth;
|
||||
|
@ -805,7 +805,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
|
|||
setOnActivities(activitiesList);
|
||||
}
|
||||
|
||||
QRectF geom = session ? session->geometry : windowGeometry.rect();
|
||||
QRectF geom = session ? session->geometry : Xcb::fromXNative(windowGeometry.rect());
|
||||
bool placementDone = false;
|
||||
|
||||
QRectF area;
|
||||
|
|
Loading…
Reference in a new issue