fix some focus problems when changing workspace
rathnor rathnor
2 files changed,
6 insertions(+),
4 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ FocusedWindows::iterator it_end = focused_list.end();
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; }
M
src/Window.cc
→
src/Window.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ }
m_frame.show(); - if (was_iconic || screen.doFocusNew()) + if (was_iconic && screen.doFocusNew()) setInputFocus(); if (focused != m_frame.focused())