diff options
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r-- | src/ScreenPlacement.cc | 7 |
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: |