X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FScreen.cc;h=f4c3dcadbee13b1c2bc5237535b1f0ef38a54dc0;hb=fb613db29ffcf1539c91f0ac0ca5d25cb4e593b5;hp=c2f52cb933b68f878d75184106c79ff6294f68f7;hpb=90dbcb271c5e6d7ca73c19a519b93885b833db0a;p=chaz%2Fopenbox diff --git a/src/Screen.cc b/src/Screen.cc index c2f52cb9..f4c3dcad 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -490,7 +490,7 @@ void BScreen::saveDateFormat(int f) { } -void BScreen::saveClock24Hour(Bool c) { +void BScreen::saveClock24Hour(bool c) { resource.clock24hour = c; config->setValue(screenstr + "clockFormat", resource.clock24hour ? 24 : 12); } @@ -510,6 +510,20 @@ void BScreen::saveWorkspaceNames() { } +void BScreen::savePlaceIgnoreShaded(bool i) { + resource.ignore_shaded = i; + config->setValue(screenstr + "placementIgnoreShaded", + resource.ignore_shaded); +} + + +void BScreen::savePlaceIgnoreMaximized(bool i) { + resource.ignore_maximized = i; + config->setValue(screenstr + "placementIgnoreMaximized", + resource.ignore_maximized); +} + + void BScreen::save_rc(void) { saveSloppyFocus(resource.sloppy_focus); saveAutoRaise(resource.auto_raise); @@ -534,6 +548,8 @@ void BScreen::save_rc(void) { saveDateFormat(resource.date_format); savwClock24Hour(resource.clock24hour); #endif // HAVE_STRFTIME + savePlaceIgnoreShaded(resource.ignore_shaded); + savePlaceIgnoreMaximized(resource.ignore_maximized); toolbar->save_rc(); slit->save_rc(); @@ -639,9 +655,8 @@ void BScreen::load_rc(void) { resource.placement_policy = RowSmartPlacement; #ifdef HAVE_STRFTIME - if (config->getValue(screenstr + "strftimeFormat", s)) - resource.strftime_format = s; - else + if (! config->getValue(screenstr + "strftimeFormat", + resource.strftime_format)) resource.strftime_format = "%I:%M %p"; #else // !HAVE_STRFTIME long l; @@ -655,6 +670,14 @@ void BScreen::load_rc(void) { l = 12; resource.clock24hour = l == 24; #endif // HAVE_STRFTIME + + if (! config->getValue(screenstr + "placementIgnoreShaded", + resource.ignore_shaded)) + resource.ignore_shaded = true; + + if (! config->getValue(screenstr + "placementIgnoreMaximized", + resource.ignore_maximized)) + resource.ignore_maximized = true; } @@ -1166,7 +1189,7 @@ void BScreen::manageWindow(Window w) { BlackboxWindow *win = blackbox->searchWindow(w); if (! win) return; - if (win->isDesktop()) { + if (win->windowType() == BlackboxWindow::Type_Desktop) { // desktop windows cant do anything, so we remove all the normal window // stuff from them, they are only kept around so that we can keep them on // the bottom of the z-order