Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window Focus Lost on Switching to remote #1

Open
vijay03 opened this issue Oct 22, 2014 · 3 comments
Open

Window Focus Lost on Switching to remote #1

vijay03 opened this issue Oct 22, 2014 · 3 comments

Comments

@vijay03
Copy link

vijay03 commented Oct 22, 2014

I'm not sure if this is fixable, but here goes:

If I'm using a terminal in Window 1 on the master node, switch to a terminal in Window 2 (alt + tab), and then switch to the remote, when I switch back to the master node, the focus is on Window 1, and not on Window 2.

@zevweiss
Copy link
Owner

I suspect this is a side-effect of focus-follows-mouse...can you try this patch and see if it fixes the problem?

diff --git a/main.c b/main.c
index df314b7..89b1607 100644
--- a/main.c
+++ b/main.c
@@ -610,8 +610,8 @@ static void switch_to_node(struct noderef* n, keycode_t* modkeys)
        return;

    if (active_remote && !switch_to) {
-       ungrab_inputs();
        set_mousepos(saved_master_mousepos);
+       ungrab_inputs();
    } else if (!active_remote && switch_to) {
        saved_master_mousepos = get_mousepos();
        grab_inputs();

@zevweiss
Copy link
Owner

Patch appeared to have no effect. Also observed that regardless of the pointer position when switching away from the master (via hotkey), the position returned to when switching back was always the same -- and suspiciously close to (if not exactly at) the center of the screen.

@zevweiss
Copy link
Owner

There've been some recent changes that I think might affect this -- can you test with the current master (2a380b2) and see if this is still happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants