summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu OTHACEHE <m.othacehe@gmail.com>2016-12-14 19:53:59 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-12-21 23:06:08 +0100
commitcc68614a5c1c83421668556cf732c341c8da83f9 (patch)
tree36d18ce573205d3f5580d9459e44a2a40b48697b /src
parent5318f014451620f32a264d01f620562e973f3a64 (diff)
downloadratpoison-cc68614a5c1c83421668556cf732c341c8da83f9.zip
Add a hide_screen_windows function
This function is useful to find the windows displayed on a specific screen and hide them.
Diffstat (limited to 'src')
-rw-r--r--src/manage.c14
-rw-r--r--src/manage.h1
2 files changed, 15 insertions, 0 deletions
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 */