all repos — fluxbox @ bc8a31d40552a3886df695557277b2fc013799bb

custom fork of the fluxbox windowmanager

fix passing of focus when grouping
rathnor rathnor
commit

bc8a31d40552a3886df695557277b2fc013799bb

parent

206a7ca10d0747acaab1f00975ff519badf61600

2 files changed, 16 insertions(+), 1 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.9: *04/03/08: + * Fix focus passing when grouping (Simon) + Window.cc * Fix receipt of _NET_WM_DESKTOP client messages (Simon) - fixes xmms "show on all desktops" not working Ewmh.cc
M src/Window.ccsrc/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.269 2004/03/03 12:29:31 rathnor Exp $ +// $Id: Window.cc,v 1.270 2004/03/08 12:20:31 rathnor Exp $ #include "Window.hh"

@@ -601,6 +601,8 @@

// reparent client win to this frame frame().setClientWindow(client); FbTk::EventManager &evm = *FbTk::EventManager::instance(); + WinClient *was_focused = 0; + WinClient *focused_win = Fluxbox::instance()->getFocusedWindow(); // get the current window on the end of our client list Window leftwin = None;

@@ -621,6 +623,9 @@ evm.add(*this, (*client_it)->window());

// reparent window to this frame().setClientWindow(**client_it); + if ((*client_it) == focused_win) + was_focused = focused_win; + moveResizeClient(**client_it, frame().clientArea().x(), frame().clientArea().y(),

@@ -678,6 +683,8 @@ FbTk::RefCount<FbTk::Command> set_client_cmd(new SetClientCmd(client));

btn->setOnClick(set_client_cmd); evm.add(*this, btn->window()); // we take care of button events for this + if (&client == focused_win) + was_focused = focused_win; client.m_win = this; client.saveBlackboxAttribs(m_blackbox_attrib);

@@ -690,6 +697,12 @@ // affected clients if possible

m_statesig.notify(); m_workspacesig.notify(); m_layersig.notify(); + + if (was_focused != 0) { + // already has focus, we're just assuming the state of the old window + setCurrentClient(*was_focused, false); + frame().setFocus(true); + } frame().reconfigure();