From 4215599e971a87e08f5a25e48641ccb49058503e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 10 Sep 2013 09:11:19 +0200 Subject: [PATCH] And add a lower() method to Xcb::Window Just like ::raise(). --- manage.cpp | 2 +- xcbutils.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manage.cpp b/manage.cpp index 4bc9ca2b79..bf79a8f0bf 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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); diff --git a/xcbutils.h b/xcbutils.h index e23197386f..86c909b535 100644 --- a/xcbutils.h +++ b/xcbutils.h @@ -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() {