summaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index b8149b2..0eee037 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -411,6 +411,7 @@ void WinClient::updateBlackboxHints() {
411 int format; 411 int format;
412 Atom atom_return; 412 Atom atom_return;
413 unsigned long num, len; 413 unsigned long num, len;
414 unsigned char *data;
414 FbAtoms *atoms = FbAtoms::instance(); 415 FbAtoms *atoms = FbAtoms::instance();
415 416
416 if (m_blackbox_hint) { 417 if (m_blackbox_hint) {
@@ -422,19 +423,21 @@ void WinClient::updateBlackboxHints() {
422 PropBlackboxHintsElements, False, 423 PropBlackboxHintsElements, False,
423 atoms->getFluxboxHintsAtom(), &atom_return, 424 atoms->getFluxboxHintsAtom(), &atom_return,
424 &format, &num, &len, 425 &format, &num, &len,
425 (unsigned char **) &m_blackbox_hint) && 426 &data) &&
426 m_blackbox_hint) { 427 data) {
427 428
428 if (num != (unsigned)PropBlackboxHintsElements) { 429 if (num != (unsigned)PropBlackboxHintsElements) {
429 XFree(m_blackbox_hint); 430 XFree(data);
430 m_blackbox_hint = 0; 431 m_blackbox_hint = 0;
431 } 432 } else
433 m_blackbox_hint = (FluxboxWindow::BlackboxHints *) data;
432 } 434 }
433} 435}
434 436
435void WinClient::updateMWMHints() { 437void WinClient::updateMWMHints() {
436 int format; 438 int format;
437 Atom atom_return; 439 Atom atom_return;
440 unsigned char *data;
438 unsigned long num = 0, len = 0; 441 unsigned long num = 0, len = 0;
439 442
440 if (m_mwm_hint) { 443 if (m_mwm_hint) {
@@ -447,13 +450,14 @@ void WinClient::updateMWMHints() {
447 PropMwmHintsElements, false, 450 PropMwmHintsElements, false,
448 motif_wm_hints, &atom_return, 451 motif_wm_hints, &atom_return,
449 &format, &num, &len, 452 &format, &num, &len,
450 (unsigned char **) &m_mwm_hint) && 453 &data) &&
451 m_mwm_hint)) { 454 data)) {
452 if (num != static_cast<unsigned int>(PropMwmHintsElements)) { 455 if (num != static_cast<unsigned int>(PropMwmHintsElements)) {
453 XFree(m_mwm_hint); 456 XFree(m_mwm_hint);
454 m_mwm_hint = 0; 457 m_mwm_hint = 0;
455 return; 458 return;
456 } 459 }
460 m_mwm_hint = (MwmHints *) data;
457 } 461 }
458} 462}
459 463
@@ -602,12 +606,12 @@ Window WinClient::getGroupLeftWindow() const {
602 unsigned long num = 0, len = 0; 606 unsigned long num = 0, len = 0;
603 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); 607 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False);
604 608
605 Window *data = 0; 609 unsigned char *data = 0;
606 if (property(group_left_hint, 0, 610 if (property(group_left_hint, 0,
607 1, false, 611 1, false,
608 XA_WINDOW, &atom_return, 612 XA_WINDOW, &atom_return,
609 &format, &num, &len, 613 &format, &num, &len,
610 (unsigned char **) &data) && 614 &data) &&
611 data) { 615 data) {
612 if (num != 1) { 616 if (num != 1) {
613 XFree(data); 617 XFree(data);
@@ -638,12 +642,12 @@ bool WinClient::hasGroupLeftWindow() const {
638 unsigned long num = 0, len = 0; 642 unsigned long num = 0, len = 0;
639 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); 643 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False);
640 644
641 Window *data = 0; 645 unsigned char *data = 0;
642 if (property(group_left_hint, 0, 646 if (property(group_left_hint, 0,
643 1, false, 647 1, false,
644 XA_WINDOW, &atom_return, 648 XA_WINDOW, &atom_return,
645 &format, &num, &len, 649 &format, &num, &len,
646 (unsigned char **) &data) && 650 &data) &&
647 data) { 651 data) {
648 XFree(data); 652 XFree(data);
649 if (num != 1) 653 if (num != 1)