ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] [PATCH] Show frame indicator on focus* invocations


From: Antoine Busque
Subject: [RP] [PATCH] Show frame indicator on focus* invocations
Date: Mon, 26 Jun 2017 18:05:15 -0400

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.

Instead, show the current frame indicator regardless of number of
frames whenever invoking `focus*`.

Signed-off-by: Antoine Busque <address@hidden>
---
 src/actions.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index a044f7a..9dc275b 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4611,9 +4611,9 @@ cmd_focusup (int interactive UNUSED, struct cmdarg **args 
UNUSED)
   rp_frame *frame;
 
   if ((frame = find_frame_up (current_frame())))
-    set_active_frame (frame, 0);
+    set_active_frame (frame, 1);
   else
-    show_frame_indicator(0);
+    show_frame_indicator(1);
 
   return cmdret_new (RET_SUCCESS, NULL);
 }
@@ -4624,9 +4624,9 @@ cmd_focusdown (int interactive UNUSED, struct cmdarg 
**args UNUSED)
   rp_frame *frame;
 
   if ((frame = find_frame_down (current_frame())))
-    set_active_frame (frame, 0);
+    set_active_frame (frame, 1);
   else
-    show_frame_indicator(0);
+    show_frame_indicator(1);
 
   return cmdret_new (RET_SUCCESS, NULL);
 }
@@ -4637,9 +4637,9 @@ cmd_focusleft (int interactive UNUSED, struct cmdarg 
**args UNUSED)
   rp_frame *frame;
 
   if ((frame = find_frame_left (current_frame())))
-    set_active_frame (frame, 0);
+    set_active_frame (frame, 1);
   else
-    show_frame_indicator(0);
+    show_frame_indicator(1);
 
   return cmdret_new (RET_SUCCESS, NULL);
 }
@@ -4650,9 +4650,9 @@ cmd_focusright (int interactive UNUSED, struct cmdarg 
**args UNUSED)
   rp_frame *frame;
 
   if ((frame = find_frame_right (current_frame())))
-    set_active_frame (frame, 0);
+    set_active_frame (frame, 1);
   else
-    show_frame_indicator(0);
+    show_frame_indicator(1);
 
   return cmdret_new (RET_SUCCESS, NULL);
 }
-- 
2.13.1




reply via email to

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