ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] [PATCH 1/2] Add a hide_screen_windows function


From: Mathieu OTHACEHE
Subject: [RP] [PATCH 1/2] Add a hide_screen_windows function
Date: Wed, 14 Dec 2016 19:53:59 +0100

This function is useful to find the windows displayed on a specific screen and
hide them.
---
 src/manage.c | 14 ++++++++++++++
 src/manage.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/src/manage.c b/src/manage.c
index 4296480..f2a15f5 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -978,3 +978,17 @@ hide_others (rp_window *win)
       hide_window (cur);
     }
 }
+
+/* Hide any window displayed on the given screen */
+void
+hide_screen_windows (rp_screen *s)
+{
+    rp_frame *cur_frame;
+    rp_window *cur_win;
+
+  list_for_each_entry (cur_frame, &s->frames, node)
+    {
+      cur_win = find_window_number (cur_frame->win_number);
+      hide_window (cur_win);
+    }
+}
diff --git a/src/manage.h b/src/manage.h
index e83a5f2..6788485 100644
--- a/src/manage.h
+++ b/src/manage.h
@@ -55,5 +55,6 @@ void unhide_all_windows (void);
 void unhide_window_below (rp_window *win);
 void withdraw_window (rp_window *win);
 void hide_others (rp_window *win);
+void hide_screen_windows (rp_screen *s);
 
 #endif /* ! _RATPOISION_MANAGE_H */
-- 
2.10.2




reply via email to

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