From a69b117fe4a2abb4eaeb70b41a98b0561912472c Mon Sep 17 00:00:00 2001 From: rathnor Date: Fri, 27 Jun 2003 15:05:19 +0000 Subject: fix slit netizen issues --- ChangeLog | 3 +++ src/Screen.cc | 8 +++----- src/Slit.cc | 30 ++++++++++++++++++++++++------ src/WinClient.cc | 4 +++- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index badc7a2..da7a447 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.4: +*03/06/28: + * Fix slit netizens (e.g. withdrawn pager) (Simon) + Slit.cc WinClient.cc Screen.cc *03/06/26: * Speedups for having many (particularly stuck) windows (Simon) Toolbar.hh/cc IconBar.hh/cc ToolbarHandler.cc Gnome.cc Window.cc diff --git a/src/Screen.cc b/src/Screen.cc index b2d0190..eee6f2d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.195 2003/06/25 05:47:23 fluxgen Exp $ +// $Id: Screen.cc,v 1.196 2003/06/27 15:05:19 rathnor Exp $ #include "Screen.hh" @@ -1034,13 +1034,11 @@ void BScreen::updateNetizenConfigNotify(XEvent &e) { FluxboxWindow *BScreen::createWindow(Window client) { WinClient *winclient = new WinClient(client, *this); + if (winclient->initial_state == WithdrawnState) { + delete winclient; #ifdef SLIT - if (winclient->initial_state == WithdrawnState) slit()->addClient(client); - #endif // SLIT - if (winclient->initial_state == WithdrawnState) { - delete winclient; return 0; } diff --git a/src/Slit.cc b/src/Slit.cc index b135303..cef7448 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.68 2003/06/24 20:19:36 fluxgen Exp $ +// $Id: Slit.cc,v 1.69 2003/06/27 15:05:19 rathnor Exp $ #include "Slit.hh" @@ -56,6 +56,7 @@ #include "SlitTheme.hh" #include "SlitClient.hh" #include "Xutil.hh" +#include "FbAtoms.hh" #include #include @@ -67,6 +68,7 @@ #endif // HAVE_SYS_STAT_H #include +#include #include #include @@ -452,12 +454,28 @@ void Slit::addClient(Window w) { client->setWindow(client->clientWindow()); } - XFree(wmhints); + XFree((void *) wmhints); } else { client->setIconWindow(None); client->setWindow(client->clientWindow()); } + Atom *proto = 0; + int num_return = 0; + FbAtoms *fbatoms = FbAtoms::instance(); + + if (XGetWMProtocols(disp, w, &proto, &num_return)) { + + for (int i = 0; i < num_return; ++i) { + if (proto[i] == fbatoms->getFluxboxStructureMessagesAtom()) + screen().addNetizen(w); + } + + XFree((void *) proto); + } else { + cerr<<"Warning: Failed to read WM Protocols. "<removeGroupSearch(window_group); window_group = 0; -- cgit v0.11.2