diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-26 08:37:15 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-26 08:37:15 +0000 |
| commit | 83b6c9bfa0ccc8088e4c65e5a2cf139933959565 (patch) | |
| tree | f27f3a710d25eceb2027001f14c05fcd8936c1fe /src/Screen.cc | |
| parent | cd6c4ebcb27b796b214296aefd78a41235dd8640 (diff) | |
sync with bb-cvs
Diffstat (limited to 'src/Screen.cc')
| -rw-r--r-- | src/Screen.cc | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index eee7db10..019a29a2 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -283,7 +283,7 @@ BScreen::BScreen(Blackbox *bb, unsigned int scrn) : ScreenInfo(bb, scrn) { // manage shown windows for (i = 0; i < nchild; ++i) { - if (children[i] == None || (! blackbox->validateWindow(children[i]))) + if (children[i] == None || ! blackbox->validateWindow(children[i])) continue; XWindowAttributes attrib; @@ -1232,6 +1232,14 @@ void BScreen::manageWindow(Window w) { return; } + // is the window a docking app + XWMHints *wmhint = XGetWMHints(blackbox->getXDisplay(), w); + if (wmhint && (wmhint->flags & StateHint) && + wmhint->initial_state == WithdrawnState) { + slit->addClient(w); + return; + } + new BlackboxWindow(blackbox, w, this); BlackboxWindow *win = blackbox->searchWindow(w); @@ -1763,7 +1771,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { break; case 421: // exec - if ((! *label) && (! *command)) { + if (! (*label || *command)) { fprintf(stderr, i18n(ScreenSet, ScreenEXECError, "BScreen::parseMenuFile: [exec] error, " "no menu label and/or command defined\n")); @@ -1786,21 +1794,19 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { break; - case 561: // style - { - if ((! *label) || (! *command)) { - fprintf(stderr, - i18n(ScreenSet, ScreenSTYLEError, - "BScreen::parseMenuFile: [style] error, " - "no menu label and/or filename defined\n")); - continue; - } - - string style = expandTilde(command); - - menu->insert(label, BScreen::SetStyle, style.c_str()); + case 561: { // style + if (! (*label && *command)) { + fprintf(stderr, + i18n(ScreenSet, ScreenSTYLEError, + "BScreen::parseMenuFile: [style] error, " + "no menu label and/or filename defined\n")); + continue; } + string style = expandTilde(command); + + menu->insert(label, BScreen::SetStyle, style.c_str()); + } break; case 630: // config @@ -1830,7 +1836,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { if (submenufile) { struct stat buf; if (fstat(fileno(submenufile), &buf) || - (! S_ISREG(buf.st_mode))) { + ! S_ISREG(buf.st_mode)) { fprintf(stderr, i18n(ScreenSet, ScreenINCLUDEErrorReg, "BScreen::parseMenuFile: [include] error: " @@ -1912,7 +1918,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { { bool newmenu = ((key == 1113) ? True : False); - if ((! *label) || ((! *command) && newmenu)) { + if (! *label || (! *command && newmenu)) { fprintf(stderr, i18n(ScreenSet, ScreenSTYLESDIRError, "BScreen::parseMenuFile: [stylesdir/stylesmenu]" @@ -1958,7 +1964,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { style += '/'; style += fname; - if ((! stat(style.c_str(), &statbuf)) && + if (! stat(style.c_str(), &statbuf) && S_ISREG(statbuf.st_mode)) stylesmenu->insert(fname, BScreen::SetStyle, style); } |
