store logic (what we think) geometry of XCB Window
This allows us to check and compare geometry of system windows, no matter what the interim logic client geometry (eg. shaded etc.) is REVIEW: 124591
This commit is contained in:
parent
b8e433d0a9
commit
62b6401175
1 changed files with 6 additions and 0 deletions
|
@ -1385,6 +1385,7 @@ public:
|
|||
* Configures the window with a new geometry.
|
||||
* @param geometry The new window geometry to be used
|
||||
**/
|
||||
inline const QRect &geometry() const { return m_logicGeometry; }
|
||||
void setGeometry(const QRect &geometry);
|
||||
void setGeometry(uint32_t x, uint32_t y, uint32_t width, uint32_t height);
|
||||
void move(const QPoint &pos);
|
||||
|
@ -1419,6 +1420,7 @@ public:
|
|||
void kill();
|
||||
operator xcb_window_t() const;
|
||||
private:
|
||||
QRect m_logicGeometry;
|
||||
xcb_window_t doCreate(const QRect &geometry, uint16_t windowClass, uint32_t mask = 0, const uint32_t *values = NULL, xcb_window_t parent = rootWindow());
|
||||
void destroy();
|
||||
xcb_window_t m_window;
|
||||
|
@ -1490,6 +1492,7 @@ void Window::create(const QRect &geometry, uint32_t mask, const uint32_t *values
|
|||
inline
|
||||
xcb_window_t Window::doCreate(const QRect &geometry, uint16_t windowClass, uint32_t mask, const uint32_t *values, xcb_window_t parent)
|
||||
{
|
||||
m_logicGeometry = geometry;
|
||||
xcb_window_t w = xcb_generate_id(connection());
|
||||
xcb_create_window(connection(), XCB_COPY_FROM_PARENT, w, parent,
|
||||
geometry.x(), geometry.y(), geometry.width(), geometry.height(),
|
||||
|
@ -1514,6 +1517,7 @@ void Window::setGeometry(const QRect &geometry)
|
|||
inline
|
||||
void Window::setGeometry(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
|
||||
{
|
||||
m_logicGeometry.setRect(x, y, width, height);
|
||||
if (!isValid()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1531,6 +1535,7 @@ void Window::move(const QPoint &pos)
|
|||
inline
|
||||
void Window::move(uint32_t x, uint32_t y)
|
||||
{
|
||||
m_logicGeometry.moveTo(x, y);
|
||||
if (!isValid()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1546,6 +1551,7 @@ void Window::resize(const QSize &size)
|
|||
inline
|
||||
void Window::resize(uint32_t width, uint32_t height)
|
||||
{
|
||||
m_logicGeometry.setSize(QSize(width, height));
|
||||
if (!isValid()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue