[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] [PATCH] Show frame indicator on focus* invocations
From: |
Jeremie Courreges-Anglas |
Subject: |
Re: [RP] [PATCH] Show frame indicator on focus* invocations |
Date: |
Tue, 04 Jul 2017 05:58:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix) |
Hi,
Antoine Busque <address@hidden> writes:
> The current behaviour of `focus{up,down,left,right}` is to show the
> indicator if and only if the screen onto which the focus has just been
> moved (or stayed) has more than 1 frame on it.
>
> This however is rather unintuitive, especially in multi-screen setups,
> where the focus can move from one screen to a completely different
> one, without any indication of the current frame, provided that the
> newly focused screen has a single window.
This sounds very confusing indeed.
> Instead, show the current frame indicator regardless of number of
> frames whenever invoking `focus*`.
I like the idea, however... why the show_frame_indicator(0) ->
show_frame_indicator(1) changes below?
Right now, if the focus{up,down,left,right} commands can't find an
appropriate frame, they'll stay silent if you are on a single-frame
screen. I think it's nicer that way.
The rest of the patch looks correct, but I think there is room to
simplify the handling of the frame indicator. Could you please test
the diff below and report back?
diff --git a/src/split.c b/src/split.c
index a9d69cd..c7e62cf 100644
--- a/src/split.c
+++ b/src/split.c
@@ -847,6 +847,9 @@ set_active_frame (rp_frame *frame, int force_indicator)
if ((old != s->current_frame && num_frames(s) > 1)
|| s != old_s)
{
+ if (s != old_s)
+ force_indicator = 1;
+
show_frame_indicator(force_indicator);
/* run the frame switch hook. We call it in here because this is
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
- Re: [RP] [PATCH] Show frame indicator on focus* invocations,
Jeremie Courreges-Anglas <=