Репозитории ALT
S: | 0.96.0-alt1 |
5.1: | 0.92.0-alt6 |
4.1: | 0.92.0-alt2 |
4.0: | 0.92.0-alt2 |
3.0: | 0.91.0-alt1 |
+backports: | 0.92.0-alt0.M30.1 |
Группа :: Графические оболочки/Window Maker
Пакет: WindowMaker
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: WindowMaker-0.92.0-hmepas-minimizeall.patch
Скачать
Скачать
src/actions.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/actions.h | 3 +++
src/defaults.c | 3 +++
src/event.c | 4 ++++
src/keybind.h | 7 ++++---
5 files changed, 65 insertions(+), 3 deletions(-)
diff --git a/src/actions.c b/src/actions.c
index 9298bd2..bdb92bb 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1296,6 +1296,57 @@ hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
+// ADDED BY HMEPAS
+void wHideAll(WScreen *scr)
+{
+ WWindow *wwin;
+ WWindow **windows;
+ Window FocusedWin;
+ WMenu *menu;
+ unsigned int wcount = 0;
+ int FocusState;
+ int i;
+
+ if (!scr)
+ return;
+
+ menu = scr->switch_menu;
+
+ windows = malloc( sizeof(WWindow *) );
+
+ if (menu != NULL) {
+ for(i=0;i<menu->entry_no;i++) {
+ windows[wcount] = (WWindow *) menu->entries[i]->clientdata;
+ wcount++;
+ windows = realloc(windows, sizeof(WWindow *) * (wcount+1) );
+ }
+ } else {
+ wwin = scr->focused_window;
+
+ while(wwin) {
+ windows[wcount] = wwin;
+ wcount++;
+ windows = realloc(windows, sizeof(WWindow *) * (wcount+1) );
+ wwin = wwin->prev;
+
+ }
+ }
+
+ for(i=0;i < wcount; i++) {
+ wwin = windows[i];
+ if (wwin->frame->workspace == scr->current_workspace
+ && !(wwin->flags.miniaturized||wwin->flags.hidden)
+ && !wwin->flags.internal_window
+ && !WFLAGP(wwin, no_miniaturizable)
+ )
+ {
+ wwin->flags.skip_next_animation = 1;
+ wIconifyWindow(wwin);
+ }
+ }
+}
+
+
void
wHideOtherApplications(WWindow *awin)
{
diff --git a/src/actions.h b/src/actions.h
index 1974e4b..06aa418 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -69,5 +69,8 @@ void wFullscreenWindow(WWindow *wwin);
void wUnfullscreenWindow(WWindow *wwin);
+// ADDED BY HMEPAS TO MINIMIZE ALL WINDOWS ON CURRENT WORKSPACE
+void wHideAll(WScreen *src);
+
#endif
diff --git a/src/defaults.c b/src/defaults.c
index b3b5f15..794516d 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -705,6 +705,9 @@ WDefaultEntry optionList[] = {
NULL, getKeybind, setKeyGrab
},
#endif /* LITE */
+ {"AllMinimizeKey", "None", (void*)WKBD_ALLMINIMIZE,
+ NULL, getKeybind, setKeyGrab
+ },
{"WindowMenuKey", "None", (void*)WKBD_WINDOWMENU,
NULL, getKeybind, setKeyGrab
},
diff --git a/src/event.c b/src/event.c
index 3afa95f..1bfe8f3 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1414,6 +1414,10 @@ handleKeyPress(XEvent *event)
OpenWindowMenu(wwin, wwin->frame_x,
wwin->frame_y+wwin->frame->top_width, True);
break;
+ case WKBD_ALLMINIMIZE:
+ CloseWindowMenu(scr);
+ wHideAll(scr);
+ break;
case WKBD_MINIATURIZE:
if (ISMAPPED(wwin) && ISFOCUSED(wwin)
&& !WFLAGP(wwin, no_miniaturizable)) {
diff --git a/src/keybind.h b/src/keybind.h
index 4165b48..a45b371 100644
--- a/src/keybind.h
+++ b/src/keybind.h
@@ -77,12 +77,13 @@
#define WKBD_WINDOW10 44
#define WKBD_SWITCH_SCREEN 45
+#define WKBD_ALLMINIMIZE 46
#ifdef KEEP_XKB_LOCK_STATUS
-# define WKBD_TOGGLE 46
-# define WKBD_TMP 47
+# define WKBD_TOGGLE 47
+# define WKBD_TMP 48
#else
-# define WKBD_TMP 46
+# define WKBD_TMP 47
#endif
#ifdef VIRTUAL_DESKTOP