diff options
author | rathnor <rathnor> | 2003-05-11 23:44:09 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-05-11 23:44:09 (GMT) |
commit | 99b6dc4e5df2b9a8344de7cf1da102c9245cb014 (patch) | |
tree | 4c72996ab90ae98461204c8b7c0e2146de59a8e7 /src | |
parent | 7037b9ca2cdf9e03a7a54ef45d6d6f7a601725fd (diff) | |
download | fluxbox_pavel-99b6dc4e5df2b9a8344de7cf1da102c9245cb014.zip fluxbox_pavel-99b6dc4e5df2b9a8344de7cf1da102c9245cb014.tar.bz2 |
fix up various focus-related issues
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 7 | ||||
-rw-r--r-- | src/Window.cc | 9 | ||||
-rw-r--r-- | src/fluxbox.cc | 8 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index d8c02ef..bb3bf8f 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.156 2003/05/11 17:11:59 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.157 2003/05/11 23:44:08 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -1270,7 +1270,10 @@ FluxboxWindow *BScreen::createWindow(Window client) { | |||
1270 | } else { | 1270 | } else { |
1271 | // always put on end of focused list, if it gets focused it'll get pushed up | 1271 | // always put on end of focused list, if it gets focused it'll get pushed up |
1272 | // there is only the one win client at this stage | 1272 | // there is only the one win client at this stage |
1273 | focused_list.push_back(&win->winClient()); | 1273 | if (doFocusNew()) |
1274 | focused_list.push_front(&win->winClient()); | ||
1275 | else | ||
1276 | focused_list.push_back(&win->winClient()); | ||
1274 | 1277 | ||
1275 | //TODO: is next line needed? | 1278 | //TODO: is next line needed? |
1276 | Fluxbox::instance()->saveWindowSearch(client, win); | 1279 | Fluxbox::instance()->saveWindowSearch(client, win); |
diff --git a/src/Window.cc b/src/Window.cc index 9b563b0..4410f5a 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.171 2003/05/11 17:14:41 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.172 2003/05/11 23:44:08 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -1249,8 +1249,10 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) { | |||
1249 | 1249 | ||
1250 | if (iconic || reassoc) { | 1250 | if (iconic || reassoc) { |
1251 | screen().reassociateWindow(this, screen().getCurrentWorkspace()->workspaceID(), false); | 1251 | screen().reassociateWindow(this, screen().getCurrentWorkspace()->workspaceID(), false); |
1252 | } else if (moving || m_workspace_number != screen().getCurrentWorkspace()->workspaceID()) | 1252 | } else if (moving || m_workspace_number != screen().getCurrentWorkspace()->workspaceID()) { |
1253 | oplock = false; | ||
1253 | return; | 1254 | return; |
1255 | } | ||
1254 | 1256 | ||
1255 | bool was_iconic = iconic; | 1257 | bool was_iconic = iconic; |
1256 | 1258 | ||
@@ -1264,7 +1266,7 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) { | |||
1264 | (*client_it)->show(); | 1266 | (*client_it)->show(); |
1265 | (*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask); | 1267 | (*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask); |
1266 | } | 1268 | } |
1267 | 1269 | ||
1268 | m_frame.show(); | 1270 | m_frame.show(); |
1269 | 1271 | ||
1270 | if (was_iconic && screen().doFocusNew()) | 1272 | if (was_iconic && screen().doFocusNew()) |
@@ -2622,7 +2624,6 @@ void FluxboxWindow::applyDecorations() { | |||
2622 | else | 2624 | else |
2623 | m_frame.hideHandle(); | 2625 | m_frame.hideHandle(); |
2624 | 2626 | ||
2625 | m_frame.show(); | ||
2626 | // is reconfigure needed here? | 2627 | // is reconfigure needed here? |
2627 | } | 2628 | } |
2628 | 2629 | ||
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 2793670..b77bd73 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.138 2003/05/11 22:19:17 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.139 2003/05/11 23:44:09 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -2382,9 +2382,9 @@ void Fluxbox::revertFocus(BScreen &screen) { | |||
2382 | // Fluxbox::FocusModel = sloppy, click, whatever | 2382 | // Fluxbox::FocusModel = sloppy, click, whatever |
2383 | WinClient *next_focus = screen.getLastFocusedWindow(screen.getCurrentWorkspaceID()); | 2383 | WinClient *next_focus = screen.getLastFocusedWindow(screen.getCurrentWorkspaceID()); |
2384 | 2384 | ||
2385 | if (next_focus && next_focus->fbwindow()) { | 2385 | // if setting focus fails, or isn't possible, fallback correctly |
2386 | setFocusedWindow(next_focus->fbwindow()); | 2386 | if (!(next_focus && next_focus->fbwindow() && |
2387 | } else { | 2387 | next_focus->fbwindow()->setCurrentClient(*next_focus, true))) { |
2388 | setFocusedWindow(0); // so we don't get dangling m_focused_window pointer | 2388 | setFocusedWindow(0); // so we don't get dangling m_focused_window pointer |
2389 | switch (screen.getFocusModel()) { | 2389 | switch (screen.getFocusModel()) { |
2390 | case SLOPPYFOCUS: | 2390 | case SLOPPYFOCUS: |