[sawfish] Dropped button9 support. It has been broken. Proof: in src/keys.h, Button9Mask = 1 << 16 = EV
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] Dropped button9 support. It has been broken. Proof: in src/keys.h, Button9Mask = 1 << 16 = EV
- Date: Sat, 21 Aug 2010 05:21:02 +0000 (UTC)
commit 8b1c28809eee4d50c25fdd4cd0e4da7a46563556
Author: Teika kazura <teika lavabit com>
Date: Sat Aug 21 08:03:47 2010 +0900
Dropped button9 support. It has been broken.
Proof: in src/keys.h,
Button9Mask = 1 << 16 = EV_TYPE_KEY = 0x10000;
src/keys.c | 15 +++++----------
src/keys.h | 11 ++---------
src/main.c | 2 +-
3 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/src/keys.c b/src/keys.c
index faef1db..700da04 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -103,7 +103,7 @@ static unsigned int ev_mod_button_mask;
static unsigned int state_mask;
static int button_num;
-static int all_buttons[9] = { Button1, Button2, Button3, Button4, Button5, Button6, Button7, Button8, Button9 };
+static int all_buttons[8] = { Button1, Button2, Button3, Button4, Button5, Button6, Button7, Button8 };
/*
locks: currently LockMask, num_lock, and scroll_lock.
@@ -284,9 +284,6 @@ translate_event(unsigned long *code, unsigned long *mods, XEvent *xev)
case Button8:
*mods |= Button8Mask;
break;
- case Button9:
- *mods |= Button9Mask;
- break;
}
ret = TRUE;
break;
@@ -367,7 +364,6 @@ translate_event_to_x_button (repv ev, unsigned int *button, unsigned int *state)
{ Button6, Button6Mask },
{ Button7, Button7Mask },
{ Button8, Button8Mask },
- { Button9, Button9Mask },
{ 0, 0 }
};
int i;
@@ -695,7 +691,6 @@ static struct key_def default_mods[] = {
{ "Button6", Button6Mask },
{ "Button7", Button7Mask },
{ "Button8", Button8Mask },
- { "Button9", Button9Mask },
{ "Any", EV_MOD_ANY },
{ "Release", EV_MOD_RELEASE },
{ 0, 0 }
@@ -1888,10 +1883,10 @@ static void button_num_init(void){
| Button4Mask | Button5Mask);
state_mask = (1 << 13) - 1;
{
- /* delete Button6 - 9 entries from default_mods[] */
+ /* delete Button6 - 8 entries from default_mods[] */
int i, j = 0, k;
char str[10];
- for ( i = 6; i <= 9; i++){
+ for ( i = 6; i <= 8; i++){
snprintf(str, 8, "Button%d", i);
for (j = 0; default_mods[j].name != 0; j++){
if ( strncmp(default_mods[j].name, str, 8) == 0){
@@ -1903,10 +1898,10 @@ static void button_num_init(void){
}
}
}else{
- button_num = 9;
+ button_num = 8;
ev_mod_button_mask = (Button1Mask | Button2Mask | Button3Mask \
| Button4Mask | Button5Mask | Button6Mask \
- | Button7Mask | Button8Mask | Button9Mask);
+ | Button7Mask | Button8Mask );
state_mask = 0xffffffff;
}
}
diff --git a/src/keys.h b/src/keys.h
index 46eccfa..97ea3c2 100644
--- a/src/keys.h
+++ b/src/keys.h
@@ -1,4 +1,4 @@
-/* keys.h -- Event structures
+/* keys.h -- Event macros and constants.
$Id$
Copyright (C) 1999 John Harper <john dcs warwick ac uk>
@@ -71,7 +71,7 @@ enum {
EV_VIRT_MOD_MASK = 0x0ff00000
};
-/* Support for buttons 6, 7, 8 and 9.
+/* Support for buttons 6, 7, 8.
<X11/X.h> doesn't define these, even though XFree supports them.. */
@@ -96,13 +96,6 @@ enum {
# define Button8Mask (1<<15)
#endif
-#ifndef Button9
-# define Button9 9
-#endif
-#ifndef Button9Mask
-# define Button9Mask (1<<16)
-#endif
-
/* In key maps, a `key' is (COMMAND . EVENT) */
#define KEYP(v) (rep_CONSP(v) && rep_CONSP(rep_CDR(v)))
diff --git a/src/main.c b/src/main.c
index 7e479d1..c439e3d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -472,7 +472,7 @@ where OPTIONS are any of:\n\
--load FILE load the file of Lisp forms called FILE\n\
-l FILE\n\
\n\
- --5-buttons ignore buttons 6 - x, fixes kbd layout switching\n\
+ --5-buttons ignore buttons 6 - 8 to enable kbd layout switching\n\
--version print version details\n\
--no-rc don't load rc or site-init files\n\
--quit, -q terminate the interpreter process\n", prog_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]