From 595e3011704ceccbb5f22886f46ab7d05968e07b Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 8 Jul 2007 22:49:12 +0000 Subject: remove _NET_WM_DESKTOP, _NET_WM_STATE, and Gnome hints on client close --- src/Ewmh.cc | 9 +++++++++ src/Gnome.cc | 11 +++++++++++ src/Gnome.hh | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index afa138c..be4e81a 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -369,8 +369,17 @@ void Ewmh::updateFocusedWindow(BScreen &screen, Window win) { (unsigned char *)&win, 1); } +// EWMH says, regarding _NET_WM_STATE and _NET_WM_DESKTOP +// The Window Manager should remove the property whenever a window is withdrawn +// but it should leave the property in place when it is shutting down void Ewmh::updateClientClose(WinClient &winclient){ updateClientList(winclient.screen()); + if (!winclient.screen().isShuttingdown()) { + XDeleteProperty(FbTk::App::instance()->display(), winclient.window(), + m_net_wm_state); + XDeleteProperty(FbTk::App::instance()->display(), winclient.window(), + m_net_wm_desktop); + } } void Ewmh::updateClientList(BScreen &screen) { diff --git a/src/Gnome.cc b/src/Gnome.cc index c401f1b..94ff9e7 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc @@ -215,6 +215,17 @@ void Gnome::updateClientList(BScreen &screen) { delete[] wl; } +void Gnome::updateClientClose(WinClient &client) { + if (client.screen().isShuttingdown()) { + XDeleteProperty(FbTk::App::instance()->display(), client.window(), + m_gnome_wm_win_workspace); + XDeleteProperty(FbTk::App::instance()->display(), client.window(), + m_gnome_wm_win_layer); + XDeleteProperty(FbTk::App::instance()->display(), client.window(), + m_gnome_wm_win_state); + } +} + void Gnome::updateWorkspaceNames(BScreen &screen) { size_t number_of_desks = screen.getWorkspaceNames().size(); diff --git a/src/Gnome.hh b/src/Gnome.hh index 3325e2f..2b07fab 100644 --- a/src/Gnome.hh +++ b/src/Gnome.hh @@ -72,6 +72,7 @@ public: void updateWorkarea(BScreen &) { } void updateFocusedWindow(BScreen &, Window) { } void updateClientList(BScreen &screen); + void updateClientClose(WinClient &winclient); void updateWorkspaceNames(BScreen &screen); void updateCurrentWorkspace(BScreen &screen); void updateWorkspaceCount(BScreen &screen); @@ -85,7 +86,6 @@ public: // ignore these ones void updateFrameClose(FluxboxWindow &win) {} - void updateClientClose(WinClient &winclient) {} bool propertyNotify(WinClient &winclient, Atom the_property); private: -- cgit v0.11.2