And add a lower() method to Xcb::Window

Just like ::raise().
This commit is contained in:
Martin Gräßlin 2013-09-10 09:11:19 +02:00
parent 070921f114
commit 4215599e97
2 changed files with 9 additions and 1 deletions

View file

@ -528,7 +528,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
// This should avoid flicker, because real restacking is done
// only after manage() finishes because of blocking, but the window is shown sooner
XLowerWindow(display(), frameId());
m_frame.lower();
if (session && session->stackingOrder != -1) {
sm_stacking_order = session->stackingOrder;
workspace()->restoreSessionStackingOrder(this);

View file

@ -432,6 +432,7 @@ public:
void resize(const QSize &size);
void resize(uint32_t width, uint32_t height);
void raise();
void lower();
void map();
void unmap();
/**
@ -587,6 +588,13 @@ void Window::raise()
xcb_configure_window(connection(), m_window, XCB_CONFIG_WINDOW_STACK_MODE, values);
}
inline
void Window::lower()
{
const uint32_t values[] = { XCB_STACK_MODE_BELOW };
xcb_configure_window(connection(), m_window, XCB_CONFIG_WINDOW_STACK_MODE, values);
}
inline
void Window::map()
{