fix some focus problems when changing workspace

This commit is contained in:
rathnor 2003-05-08 01:51:18 +00:00
parent af6a1a123f
commit 65fc419175
2 changed files with 6 additions and 4 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.148 2003/05/08 01:04:05 fluxgen Exp $
// $Id: Screen.cc,v 1.149 2003/05/08 01:51:18 rathnor Exp $
#include "Screen.hh"
@ -2447,7 +2447,9 @@ WinClient *BScreen::getLastFocusedWindow(int workspace) {
for (; it != it_end; ++it)
if ((*it)->fbwindow() &&
(((int)(*it)->fbwindow()->getWorkspaceNumber()) == workspace
|| (*it)->fbwindow()->isStuck()))
&& (!(*it)->fbwindow()->isStuck() || (*it)->fbwindow()->isFocused())))
// only give focus to a stuck window if it is currently focused
// otherwise they tend to override normal workspace focus
return *it;
return 0;
}

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Window.cc,v 1.161 2003/05/07 16:44:51 rathnor Exp $
// $Id: Window.cc,v 1.162 2003/05/08 01:51:18 rathnor Exp $
#include "Window.hh"
@ -1260,7 +1260,7 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
m_frame.show();
if (was_iconic || screen.doFocusNew())
if (was_iconic && screen.doFocusNew())
setInputFocus();
if (focused != m_frame.focused())