Search
lxdream.org :: lxdream/src/display.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/display.c
changeset 627:c218b062a843
prev615:38b69ec2f4c8
next681:1755a126b109
author nkeynes
date Thu Apr 17 00:01:40 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Patch up the osmesa driver
file annotate diff log raw
1.1 --- a/src/display.c Mon Jan 28 11:17:15 2008 +0000
1.2 +++ b/src/display.c Thu Apr 17 00:01:40 2008 +0000
1.3 @@ -297,17 +297,19 @@
1.4 {
1.5 keymap_entry_t key = keyhooks;
1.6 if( key != NULL ) {
1.7 - keymap_entry_t next = key->next;
1.8 if( key->callback == callback && key->data == data ) {
1.9 + keyhooks = keyhooks->next;
1.10 free(key);
1.11 - keyhooks = next;
1.12 return;
1.13 }
1.14 - while( next != NULL ) {
1.15 - if( next->callback == callback && next->data == data ) {
1.16 + while( key->next != NULL ) {
1.17 + if( key->next->callback == callback && key->next->data == data ) {
1.18 + keymap_entry_t next = key->next;
1.19 key->next = next->next;
1.20 free(next);
1.21 + return;
1.22 }
1.23 + key = key->next;
1.24 }
1.25 }
1.26 }
1.27 @@ -328,17 +330,19 @@
1.28 {
1.29 mouse_entry_t ent = mousehooks;
1.30 if( ent != NULL ) {
1.31 - mouse_entry_t next = ent->next;
1.32 if( ent->callback == callback && ent->data == data ) {
1.33 + mousehooks = mousehooks->next;
1.34 free(ent);
1.35 - mousehooks = next;
1.36 return;
1.37 }
1.38 - while( next != NULL ) {
1.39 - if( next->callback == callback && next->data == data ) {
1.40 + while( ent->next != NULL ) {
1.41 + if( ent->next->callback == callback && ent->next->data == data ) {
1.42 + mouse_entry_t next = ent->next;
1.43 ent->next = next->next;
1.44 free(next);
1.45 + return;
1.46 }
1.47 + ent = ent->next;
1.48 }
1.49 }
1.50 }
.