updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / xgalaga / altmask-xgalaga-2.0.34.diff
blob2dff79941ea9b31cbc86a61623b7725add0179ba
1 diff -ur xgalaga-2.0.34-old/libsprite/data.c xgalaga-2.0.34/libsprite/data.c
2 --- xgalaga-2.0.34-old/libsprite/data.c Mon Nov 29 12:31:26 1999
3 +++ xgalaga-2.0.34/libsprite/data.c Mon Nov 29 12:51:46 1999
4 @@ -61,7 +61,7 @@
5 /* GC used for drawing the borders [BDyess] */
6 GC borderGC;
7 int controlkey = 0;
8 -#define BillsScrewyAltMask (Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)
9 +unsigned BillsScrewyAltMask = Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask;
10 int altkey = 0;
11 int W_FastClear = 0;
12 #ifdef CONTINUOUS_MOUSE
13 diff -ur xgalaga-2.0.34-old/libsprite/data.h xgalaga-2.0.34/libsprite/data.h
14 --- xgalaga-2.0.34-old/libsprite/data.h Mon Nov 29 12:31:26 1999
15 +++ xgalaga-2.0.34/libsprite/data.h Mon Nov 29 12:51:46 1999
16 @@ -88,4 +88,6 @@
18 extern int useBuffered;
20 +extern unsigned BillsScrewyAltMask;
22 #endif /* _data_h_ */
23 diff -ur xgalaga-2.0.34-old/libsprite/defs.h xgalaga-2.0.34/libsprite/defs.h
24 --- xgalaga-2.0.34-old/libsprite/defs.h Mon Nov 29 12:31:26 1999
25 +++ xgalaga-2.0.34/libsprite/defs.h Mon Nov 29 12:51:47 1999
26 @@ -106,7 +106,4 @@
28 #endif /* ABORT_ON_ERROR */
30 -#define BillsScrewyAltMask (Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)
33 #endif /* _defs_h_ */
34 diff -ur xgalaga-2.0.34-old/libsprite/init.c xgalaga-2.0.34/libsprite/init.c
35 --- xgalaga-2.0.34-old/libsprite/init.c Mon Nov 29 12:31:26 1999
36 +++ xgalaga-2.0.34/libsprite/init.c Mon Nov 29 13:17:53 1999
37 @@ -326,6 +326,36 @@
38 XSetForeground(W_Display, maskGC, 0);
41 +/* Any of Mod1 through Mod5 that are generated by XK_Num_Lock or
42 + * XK_Scroll_Lock are excluded from BillsScrewyAltMask.
43 + */
44 +static void
45 +GetAltMask()
47 + XModifierKeymap *m;
48 + int i, j;
49 + KeySym k;
51 + m = XGetModifierMapping(W_Display);
52 + if (m == NULL) {
53 + printf("Not enough memory\n");
54 + exit(1);
55 + }
57 + for (i = 3; i < 8; i++) {
58 + for (j = 0; j < m->max_keypermod; j++) {
59 + k = XKeycodeToKeysym(W_Display,
60 + m->modifiermap [i*m->max_keypermod + j], 0);
61 + if (k == XK_Num_Lock || k == XK_Scroll_Lock) {
62 + BillsScrewyAltMask &= ~(1 << i);
63 + break;
64 + }
65 + }
66 + }
68 + XFreeModifiermap(m);
71 void
72 W_Initialize(str)
73 char *str;
74 @@ -362,6 +392,7 @@
76 GetFonts();
77 GetColors();
78 + GetAltMask();
80 backColor = W_Black;