diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/Window.cc b/src/Window.cc index 1837cee..79e9b43 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -133,6 +133,16 @@ WinClient *getRootTransientFor(WinClient *client) { | |||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | void callForAllTransient(FluxboxWindow& win, void (*callFunc)(FluxboxWindow&)) { | ||
137 | WinClient::TransientList::const_iterator it = win.winClient().transientList().begin(); | ||
138 | WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end(); | ||
139 | for (; it != it_end; ++it) { | ||
140 | if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) | ||
141 | // TODO: should we also check if it is the active client? | ||
142 | callFunc(*(*it)->fbwindow()); | ||
143 | } | ||
144 | } | ||
145 | |||
136 | /// raise window and do the same for each transient of the current window | 146 | /// raise window and do the same for each transient of the current window |
137 | void raiseFluxboxWindow(FluxboxWindow &win) { | 147 | void raiseFluxboxWindow(FluxboxWindow &win) { |
138 | if (win.oplock) | 148 | if (win.oplock) |
@@ -150,19 +160,10 @@ void raiseFluxboxWindow(FluxboxWindow &win) { | |||
150 | 160 | ||
151 | win.layerItem().raise(); | 161 | win.layerItem().raise(); |
152 | 162 | ||
153 | // for each transient do raise | 163 | callForAllTransient(win, raiseFluxboxWindow); |
154 | |||
155 | WinClient::TransientList::const_iterator it = win.winClient().transientList().begin(); | ||
156 | WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end(); | ||
157 | for (; it != it_end; ++it) { | ||
158 | if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) | ||
159 | // TODO: should we also check if it is the active client? | ||
160 | raiseFluxboxWindow(*(*it)->fbwindow()); | ||
161 | } | ||
162 | 164 | ||
163 | win.oplock = false; | 165 | win.oplock = false; |
164 | 166 | ||
165 | |||
166 | if (!win.winClient().transientList().empty()) | 167 | if (!win.winClient().transientList().empty()) |
167 | win.screen().layerManager().unlock(); | 168 | win.screen().layerManager().unlock(); |
168 | 169 | ||
@@ -210,16 +211,9 @@ void tempRaiseFluxboxWindow(FluxboxWindow &win) { | |||
210 | win.layerItem().tempRaise(); | 211 | win.layerItem().tempRaise(); |
211 | } | 212 | } |
212 | 213 | ||
213 | // for each transient do raise | 214 | callForAllTransient(win, tempRaiseFluxboxWindow); |
214 | WinClient::TransientList::const_iterator it = win.winClient().transientList().begin(); | ||
215 | WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end(); | ||
216 | for (; it != it_end; ++it) { | ||
217 | if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) | ||
218 | // TODO: should we also check if it is the active client? | ||
219 | tempRaiseFluxboxWindow(*(*it)->fbwindow()); | ||
220 | } | ||
221 | win.oplock = false; | ||
222 | 215 | ||
216 | win.oplock = false; | ||
223 | } | 217 | } |
224 | 218 | ||
225 | class SetClientCmd:public FbTk::Command<void> { | 219 | class SetClientCmd:public FbTk::Command<void> { |
@@ -1063,8 +1057,8 @@ void FluxboxWindow::reconfigure() { | |||
1063 | m_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); | 1057 | m_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); |
1064 | 1058 | ||
1065 | updateButtons(); | 1059 | updateButtons(); |
1066 | frame().reconfigure(); | ||
1067 | 1060 | ||
1061 | frame().reconfigure(); | ||
1068 | menu().reconfigure(); | 1062 | menu().reconfigure(); |
1069 | 1063 | ||
1070 | Client2ButtonMap::iterator it = m_labelbuttons.begin(), | 1064 | Client2ButtonMap::iterator it = m_labelbuttons.begin(), |