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