aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc46
1 files changed, 21 insertions, 25 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 9e340f8..e3df8a0 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -54,6 +54,7 @@
54#include "AtomHandler.hh" 54#include "AtomHandler.hh"
55#include "HeadArea.hh" 55#include "HeadArea.hh"
56#include "FbCommands.hh" 56#include "FbCommands.hh"
57#include "Debug.hh"
57 58
58#include "FbTk/I18n.hh" 59#include "FbTk/I18n.hh"
59#include "FbTk/Subject.hh" 60#include "FbTk/Subject.hh"
@@ -154,10 +155,8 @@ using std::mem_fun;
154using std::bind2nd; 155using std::bind2nd;
155using std::equal_to; 156using std::equal_to;
156 157
157#ifdef DEBUG
158using std::hex; 158using std::hex;
159using std::dec; 159using std::dec;
160#endif // DEBUG
161 160
162static bool running = true; 161static bool running = true;
163namespace { 162namespace {
@@ -631,10 +630,10 @@ void BScreen::initWindows() {
631 (wmhints->icon_window != children[i])) 630 (wmhints->icon_window != children[i]))
632 for (unsigned int j = 0; j < nchild; j++) { 631 for (unsigned int j = 0; j < nchild; j++) {
633 if (children[j] == wmhints->icon_window) { 632 if (children[j] == wmhints->icon_window) {
634#ifdef DEBUG 633
635 cerr<<"BScreen::initWindows(): children[j] = 0x"<<hex<<children[j]<<dec<<endl; 634 fbdbg<<"BScreen::initWindows(): children[j] = 0x"<<hex<<children[j]<<dec<<endl;
636 cerr<<"BScreen::initWindows(): = icon_window"<<endl; 635 fbdbg<<"BScreen::initWindows(): = icon_window"<<endl;
637#endif // DEBUG 636
638 children[j] = None; 637 children[j] = None;
639 break; 638 break;
640 } 639 }
@@ -664,9 +663,9 @@ void BScreen::initWindows() {
664 if (children[i] == None) 663 if (children[i] == None)
665 continue; 664 continue;
666 else if (!fluxbox->validateWindow(children[i])) { 665 else if (!fluxbox->validateWindow(children[i])) {
667#ifdef DEBUG 666
668 cerr<<"BScreen::initWindows(): not valid window = "<<hex<<children[i]<<dec<<endl; 667 fbdbg<<"BScreen::initWindows(): not valid window = "<<hex<<children[i]<<dec<<endl;
669#endif // DEBUG 668
670 children[i] = None; 669 children[i] = None;
671 continue; 670 continue;
672 } 671 }
@@ -679,10 +678,9 @@ void BScreen::initWindows() {
679 children[num_transients] = children[i]; 678 children[num_transients] = children[i];
680 num_transients++; 679 num_transients++;
681 680
682#ifdef DEBUG 681 fbdbg<<"BScreen::initWindows(): postpone creation of 0x"<<hex<<children[i]<<dec<<endl;
683 cerr<<"BScreen::initWindows(): postpone creation of 0x"<<hex<<children[i]<<dec<<endl; 682 fbdbg<<"BScreen::initWindows(): transient_for = 0x"<<hex<<transient_for<<dec<<endl;
684 cerr<<"BScreen::initWindows(): transient_for = 0x"<<hex<<transient_for<<dec<<endl; 683
685#endif // DEBUG
686 continue; 684 continue;
687 } 685 }
688 686
@@ -1001,9 +999,9 @@ void BScreen::removeIcon(FluxboxWindow *w) {
1001} 999}
1002 1000
1003void BScreen::removeWindow(FluxboxWindow *win) { 1001void BScreen::removeWindow(FluxboxWindow *win) {
1004#ifdef DEBUG 1002
1005 cerr<<"BScreen::removeWindow("<<win<<")"<<endl; 1003 fbdbg<<"BScreen::removeWindow("<<win<<")"<<endl;
1006#endif // DEBUG 1004
1007 // extra precaution, if for some reason, the 1005 // extra precaution, if for some reason, the
1008 // icon list should be out of sync 1006 // icon list should be out of sync
1009 removeIcon(win); 1007 removeIcon(win);
@@ -1922,9 +1920,8 @@ WinClient *BScreen::findGroupRight(WinClient &winclient) {
1922 return other; 1920 return other;
1923} 1921}
1924void BScreen::clearXinerama() { 1922void BScreen::clearXinerama() {
1925#ifdef DEBUG 1923 fbdbg<<"BScreen::initXinerama(): dont have Xinerama"<<endl;
1926 cerr<<"BScreen::initXinerama(): dont have Xinerama"<<endl; 1924
1927#endif // DEBUG
1928 m_xinerama_avail = false; 1925 m_xinerama_avail = false;
1929 if (m_xinerama_headinfo) 1926 if (m_xinerama_headinfo)
1930 delete [] m_xinerama_headinfo; 1927 delete [] m_xinerama_headinfo;
@@ -1940,9 +1937,9 @@ void BScreen::initXinerama() {
1940 clearXinerama(); 1937 clearXinerama();
1941 return; 1938 return;
1942 } 1939 }
1943#ifdef DEBUG 1940
1944 cerr<<"BScreen::initXinerama(): have Xinerama"<<endl; 1941 fbdbg<<"BScreen::initXinerama(): have Xinerama"<<endl;
1945#endif // DEBUG 1942
1946 m_xinerama_avail = true; 1943 m_xinerama_avail = true;
1947 1944
1948 XineramaScreenInfo *screen_info; 1945 XineramaScreenInfo *screen_info;
@@ -1969,9 +1966,8 @@ void BScreen::initXinerama() {
1969 m_xinerama_headinfo[i].height = screen_info[i].height; 1966 m_xinerama_headinfo[i].height = screen_info[i].height;
1970 } 1967 }
1971 XFree(screen_info); 1968 XFree(screen_info);
1972#ifdef DEBUG 1969
1973 cerr<<"BScreen::initXinerama(): number of heads ="<<number<<endl; 1970 fbdbg<<"BScreen::initXinerama(): number of heads ="<<number<<endl;
1974#endif // DEBUG
1975 1971
1976 /* Reallocate to the new number of heads. */ 1972 /* Reallocate to the new number of heads. */
1977 int ha_num = numHeads() ? numHeads() : 1, ha_oldnum = m_head_areas.size(); 1973 int ha_num = numHeads() ? numHeads() : 1, ha_oldnum = m_head_areas.size();