summaryrefslogtreecommitdiff
path: root/x11-wm/musca/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-wm/musca/files
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-wm/musca/files')
-rw-r--r--x11-wm/musca/files/musca-0.9.24-make.patch23
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch44
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch11
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch21
-rw-r--r--x11-wm/musca/files/musca-0.9.24_p20100226-null.patch151
-rw-r--r--x11-wm/musca/files/musca.xsession2
6 files changed, 252 insertions, 0 deletions
diff --git a/x11-wm/musca/files/musca-0.9.24-make.patch b/x11-wm/musca/files/musca-0.9.24-make.patch
new file mode 100644
index 000000000000..0f28c5653c7b
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24-make.patch
@@ -0,0 +1,23 @@
+--- a/Makefile 2009-11-03 03:20:21.000000000 +0100
++++ b/Makefile 2009-12-27 19:12:02.461539607 +0100
+@@ -1,9 +1,12 @@
+-CFLAGS?=-Wall -g
++CFLAGS ?= -Wall -g
++INCLUDES = $(shell pkg-config --cflags x11)
++LIBS = $(shell pkg-config --libs x11) -lm
++BIN_DIST = musca apis xlisten
+
+-all:
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o musca musca.c
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o apis apis.c
+- $(CC) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lc -lm -lX11 -o xlisten xlisten.c
++all: $(BIN_DIST)
++
++$(BIN_DIST):
++ $(CC) $(CFLAGS) $(INCLUDES) $@.c -o $@ $(LDFLAGS) $(LIBS)
+
+ clean:
+- rm -f musca apis
++ rm -f $(BIN_DIST)
++
++.PHONY: all clean
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch
new file mode 100644
index 000000000000..ce6bc45de73e
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-dmenu-4.4.patch
@@ -0,0 +1,44 @@
+https://bugs.archlinux.org/task/25232
+https://bugs.launchpad.net/musca/+bug/816890
+
+--- a/musca.c
++++ b/musca.c
+@@ -2162,8 +2162,16 @@ void launch(char *cmd)
+ }
+ void menu(char *cmd, char *after)
+ {
++ // we keep original behaviour by sorting
+ char *tmp = allocate(strlen(cmd)+strlen(after)+BLOCK);
+- sprintf(tmp, "%s | %s | %s", cmd, settings[ms_dmenu].s, after);
++ sprintf(tmp, "%s | sort | dmenu %s | %s", cmd, settings[ms_dmenu].s, after);
++ printf("%s\n", tmp);
++ launch(tmp); free(tmp);
++}
++void menufix(char *cmd, char*after)
++{
++ char *tmp = allocate(strlen(cmd)+strlen(after)+BLOCK);
++ sprintf(tmp, "%s %s | %s",cmd, settings[ms_dmenu].s, after);
+ printf("%s\n", tmp);
+ launch(tmp); free(tmp);
+ }
+@@ -2631,7 +2639,7 @@ char* com_command(char *cmd, regmatch_t *subs)
+ }
+ char* com_shell(char *cmd, regmatch_t *subs)
+ {
+- menu("dmenu_path", settings[ms_run_shell_command].s);
++ menufix("dmenu_run", settings[ms_run_shell_command].s);
+ return NULL;
+ }
+ char* com_alias(char *cmd, regmatch_t *subs)
+diff --git a/musca_proto.h b/musca_proto.h
+index dc14d75..e25c1ea 100644
+--- a/musca_proto.h
++++ b/musca_proto.h
+@@ -145,6 +145,7 @@ void head_focus(head *h);
+ void head_next();
+ void launch(char *cmd);
+ void menu(char *cmd, char *after);
++void menufix(char *cmd, char *after);
+ void menu_wrapper(char *cmd, char *after);
+ void shutdown();
+ dcell parse_size(char *cmd, regmatch_t *subs, ucell index, ucell limit);
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch
new file mode 100644
index 000000000000..6765ebcdcf7d
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-cycle.patch
@@ -0,0 +1,11 @@
+--- a/musca.c
++++ b/musca.c
+@@ -3202,7 +3202,7 @@ void mapnotify(XEvent *ev)
+ handle_map(ws);
+ head *h = head_by_root(ws->attr.root);
+ if (is_netwmstate(ws->state, NetWMStateFullscreen))
+- stack_push(h->fullscreen, (void*)ws);
++ stack_push(h->fullscreen, (void*)ws->w);
+ else
+ if (ws->attr.override_redirect || is_netwmstate(ws->state, NetWMStateAbove))
+ stack_push(h->above, (void*)ws->w);
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch
new file mode 100644
index 000000000000..23bd9283467a
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-fix-pad.patch
@@ -0,0 +1,21 @@
+--- a/musca.c
++++ b/musca.c
+@@ -1985,7 +1985,8 @@ void group_other()
+ // resize frames to match changes in the screen border padding
+ void group_resize(group *ta, int l, int r, int t, int b)
+ {
+- frame *f = ta->frames; int i;
++ frame *f = ta->frames; int i, j;
++ client *c = ta->clients;
+ int sw = ta->head->screen->width;
+ int sh = ta->head->screen->height;
+ if (l < ta->l) { frames_fill_gap(ta, l, ta->t, ta->l - l, sh - ta->b, FRAMES_ALL); ta->l = l; }
+@@ -1998,6 +1999,8 @@ void group_resize(group *ta, int l, int r, int t, int b)
+ else if (b > ta->b) { frames_make_gap(ta, ta->l, sh - b, sw - ta->l - ta->r, b - ta->b); ta->b = b; }
+ FOR_RING (NEXT, f, ta->frames, i)
+ frame_update(f);
++ FOR_RING (NEXT, c, ta->clients, j)
++ client_configure(c,NULL);
+ }
+ group* group_by_name(head *h, char *name)
+ {
diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch
new file mode 100644
index 000000000000..6efb77ff0b35
--- /dev/null
+++ b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch
@@ -0,0 +1,151 @@
+https://bugs.launchpad.net/musca/+bug/1236500
+
+
+--- a/musca.c
++++ b/musca.c
+@@ -421,7 +421,7 @@
+ if (s->depth)
+ {
+ int *indexes = allocate(sizeof(int) * s->depth);
+- int count = 0, i; Window *w;
++ int count = 0, i; Window *w = NULL;
+ FOR_STACK (w, s, Window*, i)
+ {
+ note("%d", i);
+@@ -1673,7 +1673,6 @@
+ frame *f = t->frames;
+ frame **group = NULL;
+ int i = 0, x, y, w, h;
+- ubyte changes = 0;
+ if (direction == HORIZONTAL)
+ {
+ if (f->x + f->w >= t->head->screen->width - t->r)
+@@ -1684,7 +1683,6 @@
+ group = frame_siblings(f, LEFT);
+ if (frame_siblings_growable(group, LEFT, size))
+ {
+- changes = 1;
+ x = f->x - size; w = size; y = f->y; h = 0;
+ for (i = 0; group[i]; i++)
+ y = MIN(y, group[i]->y), h += group[i]->h;
+@@ -1702,7 +1700,6 @@
+ group = frame_siblings(f, RIGHT);
+ if (frame_siblings_growable(group, RIGHT, size))
+ {
+- changes = 1;
+ x = f->x + f->w; w = size; y = f->y; h = 0;
+ for (i = 0; group[i]; i++)
+ y = MIN(y, group[i]->y), h += group[i]->h;
+@@ -1725,7 +1722,6 @@
+ group = frame_siblings(f, TOP);
+ if (frame_siblings_growable(group, TOP, size))
+ {
+- changes = 1;
+ y = f->y - size; h = size; x = f->x; w = 0;
+ for (i = 0; group[i]; i++)
+ x = MIN(x, group[i]->x), w += group[i]->w;
+@@ -1743,7 +1739,6 @@
+ group = frame_siblings(f, BOTTOM);
+ if (frame_siblings_growable(group, BOTTOM, size))
+ {
+- changes = 1;
+ y = f->y + f->h; h = size; x = f->x; w = 0;
+ for (i = 0; group[i]; i++)
+ x = MIN(x, group[i]->x), w += group[i]->w;
+@@ -2205,11 +2200,9 @@
+ char* com_frame_split(char *cmd, regmatch_t *subs)
+ {
+ group *g = heads->groups; frame *f = g->frames;
+- int sw = heads->screen->width - g->l - g->r,
+- sh = heads->screen->height - g->t - g->b;
+ char *mode = regsubstr(cmd, subs, 1);
+- ucell fs = f->h, ss = sh; ubyte dir = VERTICAL;
+- if (*mode == 'h') { fs = f->w; ss = sw; dir = HORIZONTAL; }
++ ucell fs = f->h; ubyte dir = VERTICAL;
++ if (*mode == 'h') { fs = f->w; dir = HORIZONTAL; }
+ dcell size = parse_size(cmd, subs, 2, fs);
+ frame_split(dir, size / fs);
+ free(mode);
+@@ -2630,7 +2623,7 @@
+ }
+ char* com_command(char *cmd, regmatch_t *subs)
+ {
+- int i; alias *a; autostr s; str_create(&s);
++ int i; alias *a = NULL; autostr s; str_create(&s);
+ str_print(&s, strlen(command_hints)+NOTE, "%s \n", command_hints);
+ FOR_STACK (a, aliases, alias*, i) str_print(&s, NOTE, "%s \n", a->name);
+ menu_wrapper(s.pad, settings[ms_run_musca_command].s);
+@@ -2747,7 +2740,7 @@
+ char* show_aliases()
+ {
+ autostr s; str_create(&s);
+- alias *a; int i;
++ alias *a = NULL; int i;
+ FOR_STACK (a, aliases, alias*, i)
+ str_print(&s, strlen(a->name)+strlen(a->command)+10, "alias %s %s\n",
+ a->name, a->command);
+@@ -2849,7 +2842,7 @@
+ }
+ char* com_place(char *cmd, regmatch_t *subs)
+ {
+- placement *p; int i;
++ placement *p = NULL; int i;
+ char *class = regsubstr(cmd, subs, 1);
+ ubyte flag = parse_flag(cmd, subs, 2, 0);
+ char *group = regsubstr(cmd, subs, 3);
+@@ -3441,7 +3434,7 @@
+ autostr s; str_create(&s);
+ for (;;)
+ {
+- char c = getchar();
++ int c = getchar();
+ if (c == EOF) break;
+ str_push(&s, c);
+ }
+@@ -3530,7 +3523,7 @@
+ }
+ void grab_stuff()
+ {
+- int i, j, k; head *h; binding *b; ucell *m;
++ int i, j, k; head *h; binding *b; ucell *m = NULL;
+ refresh_bindings();
+ ungrab_stuff();
+ ucell modifiers[] = { 0, LockMask, NumlockMask, LockMask|NumlockMask };
+@@ -3550,7 +3543,7 @@
+ {
+ int i;
+ command_hash = hash_create();
+- command *c; autostr str; str_create(&str);
++ command *c = NULL; autostr str; str_create(&str);
+ FOR_ARRAY (c, commands, command, i)
+ {
+ char *keys = c->keys;
+@@ -3566,7 +3559,7 @@
+ strtrim(command_hints);
+ // compile setting regex
+ setting_hash = hash_create();
+- setting *s;
++ setting *s = NULL;
+ FOR_ARRAY (s, settings, setting, i)
+ hash_set(setting_hash, s->name, s);
+ // compile modmask regex
+@@ -3597,7 +3590,7 @@
+ }
+ void setup_bindings()
+ {
+- int i; keymap *k;
++ int i; keymap *k = NULL;
+ // prepare key bindings
+ bindings = stack_create();
+ FOR_ARRAY (k, keymaps, keymap, i)
+--- a/tools.c
++++ b/tools.c
+@@ -227,7 +227,7 @@
+ ucell ptr = 0;
+ for (;;)
+ {
+- byte c = fgetc(src);
++ int c = fgetc(src);
+ if (c == EOF)
+ break;
+
diff --git a/x11-wm/musca/files/musca.xsession b/x11-wm/musca/files/musca.xsession
new file mode 100644
index 000000000000..41e90a7ceb3e
--- /dev/null
+++ b/x11-wm/musca/files/musca.xsession
@@ -0,0 +1,2 @@
+#!/bin/sh
+musca