# Top to Bottom
$ #BottomTop
# Bottom to Top
+$ #IgnoreShaded
+# Ignore shaded windows
+$ #IgnoreMax
+# Ignore full-maximized windows
BScreen::TopBottom);
insert(i18n(ConfigmenuSet, ConfigmenuBottomTop, "Bottom to Top"),
BScreen::BottomTop);
+ insert(i18n(ConfigmenuSet, ConfigmenuIgnoreShaded, "Ignore shaded windows"),
+ BScreen::IgnoreShaded);
+ insert(i18n(ConfigmenuSet, ConfigmenuIgnoreMax,
+ "Ignore full-maximized windows"),
+ BScreen::IgnoreMaximized);
update();
setValues();
}
setItemSelected(7, ! tb);
setItemEnabled(6, e);
setItemEnabled(7, e);
+
+ setItemSelected(8, getScreen()->getPlaceIgnoreShaded());
+ setItemSelected(9, getScreen()->getPlaceIgnoreMaximized());
}
setItemSelected(6, false);
setItemSelected(7, true);
+ break;
+
+ case BScreen::IgnoreShaded:
+ getScreen()->savePlaceIgnoreShaded(! getScreen()->getPlaceIgnoreShaded());
+
+ setItemSelected(8, getScreen()->getPlaceIgnoreShaded());
+
+ break;
+
+ case BScreen::IgnoreMaximized:
+ getScreen()->
+ savePlaceIgnoreMaximized(! getScreen()->getPlaceIgnoreMaximized());
+
+ setItemSelected(9, getScreen()->getPlaceIgnoreMaximized());
+
break;
}
}
}
-void BScreen::saveClock24Hour(Bool c) {
+void BScreen::saveClock24Hour(bool c) {
resource.clock24hour = c;
config->setValue(screenstr + "clockFormat", resource.clock24hour ? 24 : 12);
}
}
+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);
saveDateFormat(resource.date_format);
savwClock24Hour(resource.clock24hour);
#endif // HAVE_STRFTIME
+ savePlaceIgnoreShaded(resource.ignore_shaded);
+ savePlaceIgnoreMaximized(resource.ignore_maximized);
toolbar->save_rc();
slit->save_rc();
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;
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;
}
bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
opaque_move, full_max, focus_new, focus_last, click_raise,
- hide_toolbar, window_to_window_snap, window_corner_snap, aa_fonts;
+ hide_toolbar, window_to_window_snap, window_corner_snap, aa_fonts,
+ ignore_shaded, ignore_maximized;
BColor border_color;
unsigned int workspaces;
void updateWorkArea(void);
public:
enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement,
- UnderMousePlacement, LeftRight, RightLeft, TopBottom, BottomTop };
+ UnderMousePlacement, LeftRight, RightLeft, TopBottom, BottomTop,
+ IgnoreShaded, IgnoreMaximized };
enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet };
enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,
WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise,
{ return resource.border_width; }
inline unsigned int getResizeZones(void) const
{ return resource.resize_zones; }
+ inline bool getPlaceIgnoreShaded(void) const
+ { return resource.ignore_shaded; }
+ inline bool getPlaceIgnoreMaximized(void) const
+ { return resource.ignore_maximized; }
inline unsigned int getCurrentWorkspaceID(void) const
{ return current_workspace->getID(); }
void saveWindowToWindowSnap(bool s);
void saveWindowCornerSnap(bool s);
void saveResizeZones(unsigned int z);
+ void savePlaceIgnoreShaded(bool i);
+ void savePlaceIgnoreMaximized(bool i);
inline void iconUpdate(void) { iconmenu->update(); }
#ifdef HAVE_STRFTIME
for (; wit != end; ++wit) {
const BlackboxWindow* const curr = *wit;
- if (curr->isShaded()) continue;
+ if (curr->isShaded() && screen->getPlaceIgnoreShaded()) continue;
+ if (curr->isMaximizedFull() && screen->getPlaceIgnoreMaximized()) continue;
tmp.setRect(curr->frameRect().x(), curr->frameRect().y(),
curr->frameRect().width() + screen->getBorderWidth(),