Alopex

Check-in [2e35545abe]

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

Overview
Comment:Merge pull request #51 from pfernie/mod_mask_support Support ModX Bind.Mod values besides just Mod4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk | master
Files: files | file ages | folders
SHA3-256:2e35545abe33edb25029f4ee5bc017bea9381d522364ccf5c86929dbae3c1ffc
User & Date: jesse@mccluresk9.com 2014-06-22 22:12:42
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:24
Support ModX Bind.Mod values besides just Mod4 Allow user to specify Mod1, Mod2, etc. as Bind.Mod values check-in: 42fdaaf0e5 user: patrick.fernie@gmail.com tags: trunk, master
Changes

Changes to src/config.c.

231
232
233
234
235
236
237


238
239
240
241







242
243
244
245
246
247
248
249
250
251
252
253
254
255
	char class[256], *type;
	XrmValue val;
	int i, j, tmod;
	for (i = 1; i < MAX_MOD; i++) {
		sprintf(class,"%s.Bind.Mod.%s",base,ord[i]);
		if (XrmGetResource(xrdb, class, class, &type, &val)) {
			mods[i] = 0;


			if (strcasestr(val.addr,"super") ||
					strcasestr(val.addr, "win") ||
					strcasestr(val.addr, "mod4"))
				mods[i] |= Mod4Mask;







			if (strcasestr(val.addr, "control") ||
					strcasestr(val.addr,"ctrl"))
				mods[i] |= ControlMask;
			if (strcasestr(val.addr, "shift"))
				mods[i] |= ShiftMask;
			if (strcasestr(val.addr, "alt"))
				mods[i] |= Mod1Mask;
		}
	}
	/* loop through bindings */
	conf.key = NULL;
	conf.nkeys = 0;
	int bmax = 100;
//	sprintf(class,"%s.Bind.Max",base);







>
>




>
>
>
>
>
>
>





<
<







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255


256
257
258
259
260
261
262
	char class[256], *type;
	XrmValue val;
	int i, j, tmod;
	for (i = 1; i < MAX_MOD; i++) {
		sprintf(class,"%s.Bind.Mod.%s",base,ord[i]);
		if (XrmGetResource(xrdb, class, class, &type, &val)) {
			mods[i] = 0;
			if (strcasestr(val.addr, "mod5"))
				mods[i] |= Mod5Mask;
			if (strcasestr(val.addr,"super") ||
					strcasestr(val.addr, "win") ||
					strcasestr(val.addr, "mod4"))
				mods[i] |= Mod4Mask;
			if (strcasestr(val.addr, "mod3"))
				mods[i] |= Mod3Mask;
			if (strcasestr(val.addr, "mod2"))
				mods[i] |= Mod2Mask;
			if (strcasestr(val.addr, "alt") ||
					strcasestr(val.addr, "mod1"))
				mods[i] |= Mod1Mask;
			if (strcasestr(val.addr, "control") ||
					strcasestr(val.addr,"ctrl"))
				mods[i] |= ControlMask;
			if (strcasestr(val.addr, "shift"))
				mods[i] |= ShiftMask;


		}
	}
	/* loop through bindings */
	conf.key = NULL;
	conf.nkeys = 0;
	int bmax = 100;
//	sprintf(class,"%s.Bind.Max",base);