aboutsummaryrefslogtreecommitdiff
path: root/src/ScreenPlacement.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-03-20 13:18:31 (GMT)
committersimonb <simonb>2006-03-20 13:18:31 (GMT)
commit8e4f538cf9872ab0f44ad1e467d256e6626f768c (patch)
tree5e0327c361e11254369cedf385428766f9b732d4 /src/ScreenPlacement.cc
parentf2d3fff4d4db7677814379139dcec3e31fc68047 (diff)
downloadfluxbox-8e4f538cf9872ab0f44ad1e467d256e6626f768c.zip
fluxbox-8e4f538cf9872ab0f44ad1e467d256e6626f768c.tar.bz2
some small placement fixes
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r--src/ScreenPlacement.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc
index ef1f243..86c0804 100644
--- a/src/ScreenPlacement.cc
+++ b/src/ScreenPlacement.cc
@@ -47,8 +47,8 @@ ScreenPlacement::ScreenPlacement(BScreen &screen):
47 m_placement_policy(screen.resourceManager(), ROWSMARTPLACEMENT, 47 m_placement_policy(screen.resourceManager(), ROWSMARTPLACEMENT,
48 screen.name()+".windowPlacement", 48 screen.name()+".windowPlacement",
49 screen.altName()+".WindowPlacement"), 49 screen.altName()+".WindowPlacement"),
50 m_old_policy(*m_placement_policy), 50 m_old_policy(ROWSMARTPLACEMENT),
51 m_strategy(new RowSmartPlacement()) 51 m_strategy(0)
52{ 52{
53} 53}
54 54
@@ -56,9 +56,10 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist
56 const FluxboxWindow &win, 56 const FluxboxWindow &win,
57 int &place_x, int &place_y) { 57 int &place_x, int &place_y) {
58 58
59
59 // check the resource placement and see if has changed 60 // check the resource placement and see if has changed
60 // and if so update the strategy 61 // and if so update the strategy
61 if (m_old_policy != *m_placement_policy) { 62 if (m_old_policy != *m_placement_policy || !m_strategy.get()) {
62 m_old_policy = *m_placement_policy; 63 m_old_policy = *m_placement_policy;
63 switch (*m_placement_policy) { 64 switch (*m_placement_policy) {
64 case ROWSMARTPLACEMENT: 65 case ROWSMARTPLACEMENT: