summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/window.c b/window.c
index 86af083e0..96f5a1902 100644
--- a/window.c
+++ b/window.c
@@ -262,6 +262,18 @@ void DeleteWindowById(WindowClass cls, WindowNumber number)
DeleteWindow(FindWindowById(cls, number));
}
+void DeleteWindowByClass(WindowClass cls)
+{
+ Window *w;
+ for (w = _windows; w != _last_window;) {
+ if (w->window_class == cls) {
+ DeleteWindow(w);
+ w = _windows;
+ } else
+ w++;
+ }
+}
+
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number)
{
Window *w = FindWindowById(cls, number);