Alopex

Check-in [e3c8a65315]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge pull request #50 from pfernie/focus_up Initialize Client *b to NULL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256:e3c8a6531538badd602ae4b7381abd85decc5d3336fad4ed49564c2ef6b07faf
User & Date: jesse@mccluresk9.com 2014-06-22 22:08:17
Context
2014-06-22
22:12
Merge pull request #51 from pfernie/mod_mask_support Support ModX Bind.Mod values besides just Mod4 Leaf check-in: 2e35545abe user: jesse@mccluresk9.com tags: trunk, master
22:08
Merge pull request #50 from pfernie/focus_up Initialize Client *b to NULL check-in: e3c8a65315 user: jesse@mccluresk9.com tags: trunk, master
20:18
Initialize Client *b to NULL Issuing a focus up command when at the top of the client list caused a crash due to Client *b not being initialized check-in: db92b46d48 user: patrick.fernie@gmail.com tags: trunk, master
2014-06-16
20:50
minor cleanup check-in: 7bad7d1bf9 user: jesse@mccluresk9.com tags: trunk, master
Changes

Changes to src/actions.c.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
void focus(Client *t, const char **arg) {
	if (t) {
		winmarks[0] = winmarks[1];
		winmarks[1] = t;
		return;
	}
	Container *C;
	Client *c, *a, *b;
	if (!(c=winmarks[1])) return;
	if (strncasecmp(arg[0],"flo",3)==0) { /* focus floating */
		for (a = winmarks[1]->next; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) for (a = clients; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) return;







|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
void focus(Client *t, const char **arg) {
	if (t) {
		winmarks[0] = winmarks[1];
		winmarks[1] = t;
		return;
	}
	Container *C;
	Client *c, *a, *b = NULL;
	if (!(c=winmarks[1])) return;
	if (strncasecmp(arg[0],"flo",3)==0) { /* focus floating */
		for (a = winmarks[1]->next; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) for (a = clients; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) return;