summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-10-03 11:38:41 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-10-03 11:38:41 (GMT)
commitf2ea245f1dfc7c4941143db49ae81b8fceefea8c (patch)
treea5ce1bdb3a3aedc77ad5eca4e5015525b5e95cdf
parent0f299ceecd8a2282f31ffc55db8721bbd16c6267 (diff)
downloadfluxbox_lack-f2ea245f1dfc7c4941143db49ae81b8fceefea8c.zip
fluxbox_lack-f2ea245f1dfc7c4941143db49ae81b8fceefea8c.tar.bz2
compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that'
-rw-r--r--src/FbTk/Signal.hh2
-rw-r--r--src/MinOverlapPlacement.cc7
-rw-r--r--src/Window.cc5
-rw-r--r--src/fluxbox.cc2
4 files changed, 9 insertions, 7 deletions
diff --git a/src/FbTk/Signal.hh b/src/FbTk/Signal.hh
index df30cda..7ad4d00 100644
--- a/src/FbTk/Signal.hh
+++ b/src/FbTk/Signal.hh
@@ -203,7 +203,7 @@ public:
203 /// @return A tracking ID ( not unique ) 203 /// @return A tracking ID ( not unique )
204 template <typename Signal, typename Functor> 204 template <typename Signal, typename Functor>
205 TrackID join(Signal& sig, const Functor& functor) { 205 TrackID join(Signal& sig, const Functor& functor) {
206 ValueType value = std::make_pair(&sig, sig.connect(functor)); 206 ValueType value = ValueType(&sig, sig.connect(functor));
207 std::pair<TrackID, bool> ret = m_connections.insert(value); 207 std::pair<TrackID, bool> ret = m_connections.insert(value);
208 if ( !ret.second ) { 208 if ( !ret.second ) {
209 // failed to insert this functor 209 // failed to insert this functor
diff --git a/src/MinOverlapPlacement.cc b/src/MinOverlapPlacement.cc
index cea4f51..559ff11 100644
--- a/src/MinOverlapPlacement.cc
+++ b/src/MinOverlapPlacement.cc
@@ -79,8 +79,9 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
79 // at the end, we'll find the one with minimum overlap 79 // at the end, we'll find the one with minimum overlap
80 // the size of this set is at most 2(n+2)(n+1) (n = number of windows) 80 // the size of this set is at most 2(n+2)(n+1) (n = number of windows)
81 // finding overlaps is therefore O(n^3), but it can probably be improved 81 // finding overlaps is therefore O(n^3), but it can probably be improved
82 std::list<FluxboxWindow *>::const_reverse_iterator it = windowlist.rbegin(), 82 const std::list<FluxboxWindow* >& const_windowlist = windowlist;
83 it_end = windowlist.rend(); 83 std::list<FluxboxWindow *>::const_reverse_iterator it = const_windowlist.rbegin(),
84 it_end = const_windowlist.rend();
84 for (; it != it_end; ++it) { 85 for (; it != it_end; ++it) {
85 if (*it == &win) continue; 86 if (*it == &win) continue;
86 87
@@ -154,7 +155,7 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
154 for (; reg_it != region_set.end(); ++reg_it) { 155 for (; reg_it != region_set.end(); ++reg_it) {
155 156
156 int overlap = 0; 157 int overlap = 0;
157 it = windowlist.rbegin(); 158 it = const_windowlist.rbegin();
158 for (; it != it_end; ++it) { 159 for (; it != it_end; ++it) {
159 160
160 // get the dimensions of the window 161 // get the dimensions of the window
diff --git a/src/Window.cc b/src/Window.cc
index dc4015a..2d4f85a 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -187,8 +187,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) {
187 win.screen().layerManager().lock(); 187 win.screen().layerManager().lock();
188 188
189 // lower the windows from the top down, so they don't change stacking order 189 // lower the windows from the top down, so they don't change stacking order
190 WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin(); 190 const WinClient::TransientList& transients = win.winClient().transientList();
191 WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend(); 191 WinClient::TransientList::const_reverse_iterator it = transients.rbegin();
192 WinClient::TransientList::const_reverse_iterator it_end = transients.rend();
192 for (; it != it_end; ++it) { 193 for (; it != it_end; ++it) {
193 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) 194 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic())
194 // TODO: should we also check if it is the active client? 195 // TODO: should we also check if it is the active client?
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index f44f8aa..108e400 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1204,7 +1204,7 @@ void Fluxbox::saveWindowSearchGroup(Window window, FluxboxWindow *data) {
1204} 1204}
1205 1205
1206void Fluxbox::saveGroupSearch(Window window, WinClient *data) { 1206void Fluxbox::saveGroupSearch(Window window, WinClient *data) {
1207 m_group_search.insert(pair<Window, WinClient *>(window, data)); 1207 m_group_search.insert(pair<const Window, WinClient *>(window, data));
1208} 1208}
1209 1209
1210 1210