From 03ca0654c82de2fb6b04ed33a8f34110d5c9886a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 13 May 2006 11:07:50 +0000 Subject: added net_wm_name and net_wm_icon_name to supported atoms --- src/Ewmh.cc | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index ea23a22..d4cfb3f 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -50,6 +50,19 @@ using namespace std; #define FB_new_nothrow new(std::nothrow) #endif +enum EwmhMoveResizeDirection { + _NET_WM_MOVERESIZE_SIZE_TOPLEFT = 0, + _NET_WM_MOVERESIZE_SIZE_TOP = 1, + _NET_WM_MOVERESIZE_SIZE_TOPRIGHT = 2, + _NET_WM_MOVERESIZE_SIZE_RIGHT = 3, + _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT = 4, + _NET_WM_MOVERESIZE_SIZE_BOTTOM = 5, + _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT = 6, + _NET_WM_MOVERESIZE_SIZE_LEFT = 7, + _NET_WM_MOVERESIZE_MOVE = 8, // movement only + _NET_WM_MOVERESIZE_SIZE_KEYBOARD = 9, // size via keyboard + _NET_WM_MOVERESIZE_MOVE_KEYBOARD = 10 +}; Ewmh::Ewmh() { createAtoms(); @@ -106,6 +119,8 @@ void Ewmh::initForScreen(BScreen &screen) { // window properties m_net_wm_strut, m_net_wm_state, + m_net_wm_name, + m_net_wm_icon_name, // states that we support: m_net_wm_state_sticky, @@ -149,6 +164,9 @@ void Ewmh::initForScreen(BScreen &screen) { m_net_workarea, m_net_restack_window, + // m_net_wm_moveresize, + + // desktop properties m_net_wm_desktop, m_net_desktop_names, @@ -813,13 +831,55 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, FbTk::XLayerItem &below_item = winclient->fbwindow()->layerItem(); FbTk::XLayerItem &above_item = above_win->fbwindow()->layerItem(); + // this might break the transient_for layering - below_item.getLayer().stackBelowItem(&below_item, &above_item); - return true; + // do restack if both items are on the same layer + // else ignore restack + if (&below_item.getLayer() == &above_item.getLayer()) + below_item.getLayer().stackBelowItem(&below_item, &above_item); + - } + return true; + } /* Still in progress... + else if (ce.message_type == m_net_wm_moveresize) { + if (winclient == 0 || winclient->fbwindow() == 0) + return true; + // data.l[0] = x_root + // data.l[1] = y_root + // data.l[2] = direction + // data.l[3] = button + // data.l[4] = source indication + cerr<<"("<