aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-07-08 22:49:12 (GMT)
committermarkt <markt>2007-07-08 22:49:12 (GMT)
commit857a6d0a6aaafcb453efaa7307194ea1e1387d58 (patch)
tree94b829e4fd1f82071da785e9086d59bf30713b11
parent135019abf97c7adb236c061d46e3906e51c8a145 (diff)
downloadfluxbox_pavel-857a6d0a6aaafcb453efaa7307194ea1e1387d58.zip
fluxbox_pavel-857a6d0a6aaafcb453efaa7307194ea1e1387d58.tar.bz2
remove _NET_WM_DESKTOP, _NET_WM_STATE, and Gnome hints on client close
-rw-r--r--ChangeLog3
-rw-r--r--src/Ewmh.cc9
-rw-r--r--src/Gnome.cc11
-rw-r--r--src/Gnome.hh2
4 files changed, 24 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a43ce12..bfb668e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0.0: 2Changes for 1.0.0:
3*07/07/08:
4 * Clean up state and workspace window properties on client close (Mark)
5 Ewmh.cc Gnome.cc/hh
3*07/07/07: 6*07/07/07:
4 * Don't overwrite changes to init file on reconfigure (Mark) 7 * Don't overwrite changes to init file on reconfigure (Mark)
5 Workspace.cc fluxbox.cc/hh 8 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) {
382 (unsigned char *)&win, 1); 382 (unsigned char *)&win, 1);
383} 383}
384 384
385// EWMH says, regarding _NET_WM_STATE and _NET_WM_DESKTOP
386// The Window Manager should remove the property whenever a window is withdrawn
387// but it should leave the property in place when it is shutting down
385void Ewmh::updateClientClose(WinClient &winclient){ 388void Ewmh::updateClientClose(WinClient &winclient){
386 updateClientList(winclient.screen()); 389 updateClientList(winclient.screen());
390 if (!winclient.screen().isShuttingdown()) {
391 XDeleteProperty(FbTk::App::instance()->display(), winclient.window(),
392 m_net_wm_state);
393 XDeleteProperty(FbTk::App::instance()->display(), winclient.window(),
394 m_net_wm_desktop);
395 }
387} 396}
388 397
389void Ewmh::updateClientList(BScreen &screen) { 398void 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) {
215 delete[] wl; 215 delete[] wl;
216} 216}
217 217
218void Gnome::updateClientClose(WinClient &client) {
219 if (client.screen().isShuttingdown()) {
220 XDeleteProperty(FbTk::App::instance()->display(), client.window(),
221 m_gnome_wm_win_workspace);
222 XDeleteProperty(FbTk::App::instance()->display(), client.window(),
223 m_gnome_wm_win_layer);
224 XDeleteProperty(FbTk::App::instance()->display(), client.window(),
225 m_gnome_wm_win_state);
226 }
227}
228
218void Gnome::updateWorkspaceNames(BScreen &screen) { 229void Gnome::updateWorkspaceNames(BScreen &screen) {
219 230
220 size_t number_of_desks = screen.getWorkspaceNames().size(); 231 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:
72 void updateWorkarea(BScreen &) { } 72 void updateWorkarea(BScreen &) { }
73 void updateFocusedWindow(BScreen &, Window) { } 73 void updateFocusedWindow(BScreen &, Window) { }
74 void updateClientList(BScreen &screen); 74 void updateClientList(BScreen &screen);
75 void updateClientClose(WinClient &winclient);
75 void updateWorkspaceNames(BScreen &screen); 76 void updateWorkspaceNames(BScreen &screen);
76 void updateCurrentWorkspace(BScreen &screen); 77 void updateCurrentWorkspace(BScreen &screen);
77 void updateWorkspaceCount(BScreen &screen); 78 void updateWorkspaceCount(BScreen &screen);
@@ -85,7 +86,6 @@ public:
85 86
86 // ignore these ones 87 // ignore these ones
87 void updateFrameClose(FluxboxWindow &win) {} 88 void updateFrameClose(FluxboxWindow &win) {}
88 void updateClientClose(WinClient &winclient) {}
89 bool propertyNotify(WinClient &winclient, Atom the_property); 89 bool propertyNotify(WinClient &winclient, Atom the_property);
90 90
91private: 91private: