Adding zoomswap patch (pertag compatible)

This commit is contained in:
bakkeby
2019-09-05 23:19:23 +02:00
parent 591caea975
commit e681ab5dd9
8 changed files with 94 additions and 4 deletions

View File

@@ -9,3 +9,7 @@
#if SYSTRAY_PATCH
#include "systray.c"
#endif
#if ZOOMSWAP_PATCH
#include "zoomswap.c"
#endif // ZOOMSWAP_PATCH

View File

@@ -4,4 +4,8 @@
#if SYSTRAY_PATCH
#include "systray.h"
#endif
#endif
#if ZOOMSWAP_PATCH
#include "zoomswap.h"
#endif // ZOOMSWAP_PATCH

View File

@@ -7,5 +7,7 @@ struct Pertag {
#if PERTAGBAR_PATCH
Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
#endif // PERTAGBAR_PATCH
#if ZOOMSWAP_PATCH
Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
#endif // ZOOMSWAP_PATCH
};

13
patch/zoomswap.c Normal file
View File

@@ -0,0 +1,13 @@
#if !PERTAG_PATCH
static Client *prevzoom = NULL;
#endif // PERTAG_PATCH
Client *
prevtiled(Client *c) {
Client *p;
if (!c || c == c->mon->clients)
return NULL;
for (p = c->mon->clients; p && p->next != c; p = p->next);
return p;
}

1
patch/zoomswap.h Normal file
View File

@@ -0,0 +1 @@
static Client *prevtiled(Client *c);