From 857a6d0a6aaafcb453efaa7307194ea1e1387d58 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 --- ChangeLog | 3 +++ src/Ewmh.cc | 9 +++++++++ src/Gnome.cc | 11 +++++++++++ src/Gnome.hh | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a43ce12..bfb668e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0.0: +*07/07/08: + * Clean up state and workspace window properties on client close (Mark) + Ewmh.cc Gnome.cc/hh *07/07/07: * Don't overwrite changes to init file on reconfigure (Mark) Workspace.cc fluxbox.cc/hh diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 8fede5e..afab938 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -382,8 +382,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