diff options
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r-- | src/ScreenPlacement.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index d9f8df2..d614488 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | #include "RowSmartPlacement.hh" | 27 | #include "RowSmartPlacement.hh" |
28 | #include "MinOverlapPlacement.hh" | ||
28 | #include "UnderMousePlacement.hh" | 29 | #include "UnderMousePlacement.hh" |
29 | #include "ColSmartPlacement.hh" | 30 | #include "ColSmartPlacement.hh" |
30 | #include "CascadePlacement.hh" | 31 | #include "CascadePlacement.hh" |
@@ -57,7 +58,7 @@ ScreenPlacement::ScreenPlacement(BScreen &screen): | |||
57 | { | 58 | { |
58 | } | 59 | } |
59 | 60 | ||
60 | bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist, | 61 | bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, |
61 | const FluxboxWindow &win, | 62 | const FluxboxWindow &win, |
62 | int &place_x, int &place_y) { | 63 | int &place_x, int &place_y) { |
63 | 64 | ||
@@ -73,6 +74,10 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist | |||
73 | case COLSMARTPLACEMENT: | 74 | case COLSMARTPLACEMENT: |
74 | m_strategy.reset(new ColSmartPlacement()); | 75 | m_strategy.reset(new ColSmartPlacement()); |
75 | break; | 76 | break; |
77 | case ROWMINOVERLAPPLACEMENT: | ||
78 | case COLMINOVERLAPPLACEMENT: | ||
79 | m_strategy.reset(new MinOverlapPlacement(*m_placement_policy)); | ||
80 | break; | ||
76 | case CASCADEPLACEMENT: | 81 | case CASCADEPLACEMENT: |
77 | m_strategy.reset(new CascadePlacement(win.screen())); | 82 | m_strategy.reset(new CascadePlacement(win.screen())); |
78 | break; | 83 | break; |
@@ -143,6 +148,10 @@ void FbTk::Resource<ScreenPlacement::PlacementPolicy>::setFromString(const char | |||
143 | *(*this) = ScreenPlacement::ROWSMARTPLACEMENT; | 148 | *(*this) = ScreenPlacement::ROWSMARTPLACEMENT; |
144 | else if (strcasecmp("ColSmartPlacement", str) == 0) | 149 | else if (strcasecmp("ColSmartPlacement", str) == 0) |
145 | *(*this) = ScreenPlacement::COLSMARTPLACEMENT; | 150 | *(*this) = ScreenPlacement::COLSMARTPLACEMENT; |
151 | else if (strcasecmp("RowMinOverlapPlacement", str) == 0) | ||
152 | *(*this) = ScreenPlacement::ROWMINOVERLAPPLACEMENT; | ||
153 | else if (strcasecmp("ColMinOverlapPlacement", str) == 0) | ||
154 | *(*this) = ScreenPlacement::COLMINOVERLAPPLACEMENT; | ||
146 | else if (strcasecmp("UnderMousePlacement", str) == 0) | 155 | else if (strcasecmp("UnderMousePlacement", str) == 0) |
147 | *(*this) = ScreenPlacement::UNDERMOUSEPLACEMENT; | 156 | *(*this) = ScreenPlacement::UNDERMOUSEPLACEMENT; |
148 | else if (strcasecmp("CascadePlacement", str) == 0) | 157 | else if (strcasecmp("CascadePlacement", str) == 0) |
@@ -158,6 +167,10 @@ std::string FbTk::Resource<ScreenPlacement::PlacementPolicy>::getString() const | |||
158 | return "RowSmartPlacement"; | 167 | return "RowSmartPlacement"; |
159 | case ScreenPlacement::COLSMARTPLACEMENT: | 168 | case ScreenPlacement::COLSMARTPLACEMENT: |
160 | return "ColSmartPlacement"; | 169 | return "ColSmartPlacement"; |
170 | case ScreenPlacement::ROWMINOVERLAPPLACEMENT: | ||
171 | return "RowMinOverlapPlacement"; | ||
172 | case ScreenPlacement::COLMINOVERLAPPLACEMENT: | ||
173 | return "ColMinOverlapPlacement"; | ||
161 | case ScreenPlacement::UNDERMOUSEPLACEMENT: | 174 | case ScreenPlacement::UNDERMOUSEPLACEMENT: |
162 | return "UnderMousePlacement"; | 175 | return "UnderMousePlacement"; |
163 | case ScreenPlacement::CASCADEPLACEMENT: | 176 | case ScreenPlacement::CASCADEPLACEMENT: |