Search
lxdream.org :: lxdream/src/maple/maple.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/maple/maple.c
changeset 838:9abb2fa58934
prev770:429ff505c450
next850:28782ebbd01d
author nkeynes
date Tue Sep 02 00:42:43 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Add flag to maple devices indicating whether they need a mouse grab to operate
file annotate diff log raw
1.1 --- a/src/maple/maple.c Mon Jul 28 03:41:25 2008 +0000
1.2 +++ b/src/maple/maple.c Tue Sep 02 00:42:43 2008 +0000
1.3 @@ -317,7 +317,8 @@
1.4 }
1.5 }
1.6
1.7 -void maple_reattach_all() {
1.8 +void maple_reattach_all()
1.9 +{
1.10 int i, j;
1.11 for( i=0; i<4; i++ ) {
1.12 for( j=0; j<6; j++ ) {
1.13 @@ -332,6 +333,23 @@
1.14 }
1.15 }
1.16
1.17 +gboolean maple_should_grab()
1.18 +{
1.19 + int mode = MAPLE_GRAB_DONTCARE;
1.20 + int i,j;
1.21 + for( i=0; i<4; i++ ) {
1.22 + for( j=0; j<6; j++ ) {
1.23 + if( maple_devices[i][j] != NULL ) {
1.24 + maple_device_t dev = maple_devices[i][j];
1.25 + if( dev->grab_mode > mode ) {
1.26 + mode = dev->grab_mode;
1.27 + }
1.28 + }
1.29 + }
1.30 + }
1.31 + return mode == MAPLE_GRAB_YES;
1.32 +}
1.33 +
1.34 void maple_set_device_config_value( maple_device_t dev, unsigned int key, const gchar *value )
1.35 {
1.36 if( dev != NULL && dev->set_config_value != NULL ) {
.