diff options
author | markt <markt> | 2006-07-09 04:45:02 (GMT) |
---|---|---|
committer | markt <markt> | 2006-07-09 04:45:02 (GMT) |
commit | 8a640f8d638d1f330f816a2ed00931ba2d01847d (patch) | |
tree | 92e75171c47716a3a2b642c5298054ce8bc13a2b /src/Window.cc | |
parent | f7574fe1c90118ca7421dffef0b035cb64cf78c1 (diff) | |
download | fluxbox-8a640f8d638d1f330f816a2ed00931ba2d01847d.zip fluxbox-8a640f8d638d1f330f816a2ed00931ba2d01847d.tar.bz2 |
setting focus the right way
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc index 85d1ac6..d9c273a 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -2470,17 +2470,14 @@ void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) { | |||
2470 | 2470 | ||
2471 | setState(NormalState, false); | 2471 | setState(NormalState, false); |
2472 | 2472 | ||
2473 | if (client->isTransient()) | 2473 | FluxboxWindow *cur = FocusControl::focusedFbWindow(); |
2474 | if (client->isTransient() || | ||
2475 | m_screen.currentWorkspace()->numberOfWindows() == 1 || | ||
2476 | m_screen.focusControl().focusNew() && !(cur && cur->isFullscreen())) | ||
2474 | setCurrentClient(*client, true); | 2477 | setCurrentClient(*client, true); |
2475 | else if (screen().focusControl().focusNew()) { | 2478 | else if (m_screen.focusControl().focusNew()) |
2476 | FluxboxWindow *cur = FocusControl::focusedFbWindow(); | 2479 | Fluxbox::instance()->attentionHandler().addAttention(*client); |
2477 | if (cur && cur->isFullscreen()) { | 2480 | |
2478 | setFocusFlag(false); | ||
2479 | Fluxbox::instance()->attentionHandler().addAttention(*client); | ||
2480 | } else | ||
2481 | setCurrentClient(*client, true); | ||
2482 | } else | ||
2483 | setFocusFlag(false); | ||
2484 | 2481 | ||
2485 | iconic = false; | 2482 | iconic = false; |
2486 | 2483 | ||