ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] [PATCH] Fix edge case for find_frame_[left, right, up, down] funct


From: Daniel Maturana
Subject: [RP] [PATCH] Fix edge case for find_frame_[left, right, up, down] functions
Date: Fri, 24 May 2019 02:09:42 -0400

Hi all, I've noticed what seems to a bug in the latest version (master
branch) of ratpoison.

When I have two identical screens, each of them with an identical
split (e.g., two screens with a horizontal split across the middle)
and I use the "focusdown"/"focusup" commands, the focus will often
change to the upper/lower frame, but to the opposite screen of the
currently focused frame. Looking at the source code, I can see that
the "find_frame_*" functions, e.g. "find_frame_down", don't check
whether the frame to be focused to belongs to the same screen as the
current frame, resulting in this behavior when the dimensions of the
frames are identical across the two screens (and at least for me, this
is a common scenario).

Here's a patch with a simple fix: check whether the candidate target
frame for the "find_frame_*" functions belongs to the same screen as
the current frame. For me this has fixed the issue. I didn't find this
addressed before in these archives, so apologies if it has been raised
before.
best,
Daniel

Attachment: fix_find_frame_x.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]