[PATCH] New expert option: cycle all windows from all workspaces

7 views
Skip to first unread message

david.m...@gmail.com

unread,
Jan 2, 2026, 12:59:27 PM (11 days ago) Jan 2
to Window Maker Development
Mentioned on the WMaker user mailing list, option disabled by default.

---
 WPrefs.app/Expert.c                 | 3 +++
 WindowMaker/Defaults/WindowMaker.in | 1 +
 src/WindowMaker.h                   | 1 +
 src/defaults.c                      | 2 ++
 src/switchpanel.c                   | 4 ++--
 5 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index 5b8e8200..f7b7c7ce 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -72,6 +72,9 @@ static struct expert_option {
  { N_("Cycle windows only on the active head."),
    /* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
 
+ { N_("Cycle all windows from all workspaces."),
+   /* default: */ False, OPTION_WMAKER, "CycleAllWorkspaces" },
+
  { N_("Ignore minimized windows when cycling."),
    /* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
 
diff --git a/WindowMaker/Defaults/WindowMaker.in b/WindowMaker/Defaults/WindowMaker.in
index 8acff966..0cc0f654 100644
--- a/WindowMaker/Defaults/WindowMaker.in
+++ b/WindowMaker/Defaults/WindowMaker.in
@@ -252,5 +252,6 @@
  SelectCursor = (builtin, cross);
  DialogHistoryLines = 500;
  CycleActiveHeadOnly = NO;
+ CycleAllWorkspaces = NO;
  CycleIgnoreMinimized = NO;
 }
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 14392c4d..098a6a07 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -454,6 +454,7 @@ extern struct WPreferences {
  char single_click;                  /* single click to lauch applications */
  int history_lines;                  /* history of "Run..." dialog */
  char cycle_active_head_only;        /* Cycle only windows on the active head */
+ char cycle_all_workspaces;          /* Cycle all windows from all workspaces */
  char cycle_ignore_minimized;        /* Ignore minimized windows when cycling */
  char double_click_fullscreen;       /* Double click on titlebar maximize a window to full screen*/
  char close_rootmenu_left_right_click;/* Close application menu when mouse (left or right) is clicked outside focus */
diff --git a/src/defaults.c b/src/defaults.c
index c10f27ff..878f18b8 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -849,6 +849,8 @@ WDefaultEntry optionList[] = {
      &wPreferences.history_lines, getInt, NULL, NULL, NULL},
  {"CycleActiveHeadOnly", "NO", NULL,
      &wPreferences.cycle_active_head_only, getBool, NULL, NULL, NULL},
+ {"CycleAllWorkspaces", "NO", NULL,
+     &wPreferences.cycle_all_workspaces, getBool, NULL, NULL, NULL},
  {"CycleIgnoreMinimized", "NO", NULL,
      &wPreferences.cycle_ignore_minimized, getBool, NULL, NULL, NULL},
  {"DbClickFullScreen", "NO", NULL,
diff --git a/src/switchpanel.c b/src/switchpanel.c
index cb6cda10..e12b97f9 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -79,7 +79,7 @@ static short int label_height;
 
 static int canReceiveFocus(WWindow *wwin)
 {
- if (wwin->frame->workspace != wwin->screen_ptr->current_workspace)
+ if (!wPreferences.cycle_all_workspaces && wwin->frame->workspace != wwin->screen_ptr->current_workspace)
  return 0;
 
  if (wPreferences.cycle_active_head_only &&
@@ -90,7 +90,7 @@ static int canReceiveFocus(WWindow *wwin)
  return 0;
 
  if (!wwin->flags.mapped) {
- if (!wwin->flags.shaded && !wwin->flags.miniaturized && !wwin->flags.hidden)
+ if (!wwin->flags.shaded && !wwin->flags.miniaturized && !wwin->flags.hidden && !wPreferences.cycle_all_workspaces)
  return 0;
  else
  return -1;
--
2.43.0
0001-New-expert-option-cycle-all-windows-from-all-workspa.patch

Carlos R. Mafra

unread,
Jan 2, 2026, 3:57:01 PM (11 days ago) Jan 2
to wmake...@googlegroups.com
On Fri, 2 Jan 2026 at 9:59:27 -0800, david.m...@gmail.com wrote:
> Mentioned on the WMaker user mailing list, option disabled by default.

Could you please explain it a bit more about what the patch does?
What is this new funcionality?

david.m...@gmail.com

unread,
Jan 3, 2026, 9:26:26 AM (10 days ago) Jan 3
to Window Maker Development
I saw afterwards I did not paste the original link to the WMaker user mailing list.
So basically the patch is adding a new expert option in WPrefs (disabled by default) to allow the switch panel to cycle over all the windows from all workspaces. I believe it's useful if you are using a lot of fullscreen apps each on different workspaces.

Carlos R. Mafra

unread,
Jan 3, 2026, 2:23:28 PM (10 days ago) Jan 3
to wmake...@googlegroups.com
Thanks, David!
Reply all
Reply to author
Forward
0 new messages