fix slit netizen issues

This commit is contained in:
rathnor 2003-06-27 15:05:19 +00:00
parent dce147f3c4
commit a69b117fe4
4 changed files with 34 additions and 13 deletions

View file

@ -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

View file

@ -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);
#ifdef SLIT
if (winclient->initial_state == WithdrawnState)
slit()->addClient(client);
#endif // SLIT
if (winclient->initial_state == WithdrawnState) {
delete winclient;
#ifdef SLIT
slit()->addClient(client);
#endif // SLIT
return 0;
}

View file

@ -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 <algorithm>
#include <iostream>
@ -67,6 +68,7 @@
#endif // HAVE_SYS_STAT_H
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <iostream>
#include <algorithm>
@ -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. "<<endl;
}
XWindowAttributes attrib;
#ifdef KDE
@ -476,7 +494,7 @@ void Slit::addClient(Window w) {
&ajunk, &ijunk, &uljunk, &uljunk,
(unsigned char **) &data) == Success && data) {
iskdedockapp = (data && data[0] != 0);
XFree((char *) data);
XFree((void *) data);
data = 0;
}
@ -488,7 +506,7 @@ void Slit::addClient(Window w) {
&ajunk, &ijunk, &uljunk, &uljunk,
(unsigned char **) &data) == Success && data) {
iskdedockapp = (data && data[0] != 0);
XFree((char *) data);
XFree((void *) data);
data = 0;
}
}
@ -964,7 +982,7 @@ void Slit::handleEvent(XEvent &event) {
if (data)
iskdedockapp = True;
XFree((char *) data);
XFree((void *) data);
data = 0;
}
@ -975,7 +993,7 @@ void Slit::handleEvent(XEvent &event) {
m_kwm1_dockwindow, &ajunk, &ijunk, &uljunk,
&uljunk, (unsigned char **) &data) == Success && data) {
iskdedockapp = (data && data[0] != 0);
XFree((char *) data);
XFree((void *) data);
data = 0;
}
}

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: WinClient.cc,v 1.15 2003/06/24 12:58:57 rathnor Exp $
// $Id: WinClient.cc,v 1.16 2003/06/27 15:05:19 rathnor Exp $
#include "WinClient.hh"
@ -96,6 +96,8 @@ WinClient::~WinClient() {
transients.pop_back();
}
screen().removeNetizen(window());
if (window_group != 0) {
fluxbox->removeGroupSearch(window_group);
window_group = 0;