aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-06-27 15:05:19 (GMT)
committerrathnor <rathnor>2003-06-27 15:05:19 (GMT)
commita69b117fe4a2abb4eaeb70b41a98b0561912472c (patch)
tree1d5a794c39891cd39fdf47d539eda8eac78e811f /src/Slit.cc
parentdce147f3c471ed65a1c473758293a83d655c1a8b (diff)
downloadfluxbox-a69b117fe4a2abb4eaeb70b41a98b0561912472c.zip
fluxbox-a69b117fe4a2abb4eaeb70b41a98b0561912472c.tar.bz2
fix slit netizen issues
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc30
1 files changed, 24 insertions, 6 deletions
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 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.68 2003/06/24 20:19:36 fluxgen Exp $ 25// $Id: Slit.cc,v 1.69 2003/06/27 15:05:19 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -56,6 +56,7 @@
56#include "SlitTheme.hh" 56#include "SlitTheme.hh"
57#include "SlitClient.hh" 57#include "SlitClient.hh"
58#include "Xutil.hh" 58#include "Xutil.hh"
59#include "FbAtoms.hh"
59 60
60#include <algorithm> 61#include <algorithm>
61#include <iostream> 62#include <iostream>
@@ -67,6 +68,7 @@
67#endif // HAVE_SYS_STAT_H 68#endif // HAVE_SYS_STAT_H
68 69
69#include <X11/Xatom.h> 70#include <X11/Xatom.h>
71#include <X11/Xlib.h>
70 72
71#include <iostream> 73#include <iostream>
72#include <algorithm> 74#include <algorithm>
@@ -452,12 +454,28 @@ void Slit::addClient(Window w) {
452 client->setWindow(client->clientWindow()); 454 client->setWindow(client->clientWindow());
453 } 455 }
454 456
455 XFree(wmhints); 457 XFree((void *) wmhints);
456 } else { 458 } else {
457 client->setIconWindow(None); 459 client->setIconWindow(None);
458 client->setWindow(client->clientWindow()); 460 client->setWindow(client->clientWindow());
459 } 461 }
460 462
463 Atom *proto = 0;
464 int num_return = 0;
465 FbAtoms *fbatoms = FbAtoms::instance();
466
467 if (XGetWMProtocols(disp, w, &proto, &num_return)) {
468
469 for (int i = 0; i < num_return; ++i) {
470 if (proto[i] == fbatoms->getFluxboxStructureMessagesAtom())
471 screen().addNetizen(w);
472 }
473
474 XFree((void *) proto);
475 } else {
476 cerr<<"Warning: Failed to read WM Protocols. "<<endl;
477 }
478
461 XWindowAttributes attrib; 479 XWindowAttributes attrib;
462 480
463#ifdef KDE 481#ifdef KDE
@@ -476,7 +494,7 @@ void Slit::addClient(Window w) {
476 &ajunk, &ijunk, &uljunk, &uljunk, 494 &ajunk, &ijunk, &uljunk, &uljunk,
477 (unsigned char **) &data) == Success && data) { 495 (unsigned char **) &data) == Success && data) {
478 iskdedockapp = (data && data[0] != 0); 496 iskdedockapp = (data && data[0] != 0);
479 XFree((char *) data); 497 XFree((void *) data);
480 data = 0; 498 data = 0;
481 } 499 }
482 500
@@ -488,7 +506,7 @@ void Slit::addClient(Window w) {
488 &ajunk, &ijunk, &uljunk, &uljunk, 506 &ajunk, &ijunk, &uljunk, &uljunk,
489 (unsigned char **) &data) == Success && data) { 507 (unsigned char **) &data) == Success && data) {
490 iskdedockapp = (data && data[0] != 0); 508 iskdedockapp = (data && data[0] != 0);
491 XFree((char *) data); 509 XFree((void *) data);
492 data = 0; 510 data = 0;
493 } 511 }
494 } 512 }
@@ -964,7 +982,7 @@ void Slit::handleEvent(XEvent &event) {
964 982
965 if (data) 983 if (data)
966 iskdedockapp = True; 984 iskdedockapp = True;
967 XFree((char *) data); 985 XFree((void *) data);
968 data = 0; 986 data = 0;
969 } 987 }
970 988
@@ -975,7 +993,7 @@ void Slit::handleEvent(XEvent &event) {
975 m_kwm1_dockwindow, &ajunk, &ijunk, &uljunk, 993 m_kwm1_dockwindow, &ajunk, &ijunk, &uljunk,
976 &uljunk, (unsigned char **) &data) == Success && data) { 994 &uljunk, (unsigned char **) &data) == Success && data) {
977 iskdedockapp = (data && data[0] != 0); 995 iskdedockapp = (data && data[0] != 0);
978 XFree((char *) data); 996 XFree((void *) data);
979 data = 0; 997 data = 0;
980 } 998 }
981 } 999 }