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

Lost focus when selecting window #291

Open
FabArd opened this issue Apr 10, 2024 · 0 comments
Open

Lost focus when selecting window #291

FabArd opened this issue Apr 10, 2024 · 0 comments

Comments

@FabArd
Copy link

FabArd commented Apr 10, 2024

I've written the following function:

(defcommand split (dir) ((:direction "Direction: "))
 "Add a new frame at 'dir' position (left, right, up, down) and give it the focus."
            (split-frame-in-dir (current-group)
                                (if (find dir '(:left :right)) :column :row))
            (when (find dir '(:left :up))
              (move-focus-and-or-window (if (eq dir :left) :right :down) t))
            (move-focus-and-or-window dir))

What it does is:
1 - split the screen in two frame (horizontally or vertically)
2 - move the new frame to the position indicated by 'dir' if necessary (left, right, up, down)
3 - move the focus to the new frame

When I only have one frame with an application window (e.g. Firefox). If I call this function to create a new empty frame on the left with :

C-t ;
split left

it works perfectly. You end up with firefox on the right and a new empty frame with the focus on
the left. The problem is when I move the focus to the right window (firefox), either with the mouse or the keyboard shortcut, the selection outline to indicate that the window is active is not drawn and the keyboard doesn't work in this window. It seems that no window is selected.

To solve the problem, I need to reactivate the left frame and then reactivate the right frame.

It's exactly the same problem with the command: split up

The problem doesn't arise if two applications are open: the new frame displays the second application.

If, instead of calling the split left command, I perform all the operations one by one, either via keyboard shortcuts or by calling the commands, there's no problem.

How can I solve this problem?
thank you

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

1 participant