Reply
Thread Tools
Posts: 47 | Thanked: 10 times | Joined on Dec 2007
#11
Just an idea but wouldn't setting the cursor after finding root work?

Code:
root = DefaultRootWindow(display);  // line 111
Cursor cursor=XCreateFontCursor(display,XC_arrow);
XDefineCursor(display,root,cursor);
 
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#12
Originally Posted by petergunn View Post
Just an idea but wouldn't setting the cursor after finding root work?

Code:
root = DefaultRootWindow(display);  // line 111
Cursor cursor=XCreateFontCursor(display,XC_arrow);
XDefineCursor(display,root,cursor);

I kept trying to change the cursor in KDE control panel, and there were only transparent theme cursors, so I downloaded and compiled one,

http://penguinbait.com/icons.tar

cd /
tar xvf /path/to/icons.tar

Now I can got into KDE control center and select new xcursor, its red though, so I may need to go find some different ones

If I could just slow the thing down a little.

OMG, I got a mouse!!!!!!!! woohooo Awesome work, please some way to adjust polling so I can slow this down.


Thanks very very much!!!
__________________
To all my Maemo friends. I will no longer be monitoring any of my threads here on a regular basis. I am no longer supporting anything I did under maemo at maemo.org. If you need some help with something you can reach me at tablethacker.com or www.facebook.com/penguinbait. I have disabled my PM's here, and removed myself from Council email and Community mailing list. There has been some fun times, see you around.
 
Posts: 81 | Thanked: 12 times | Joined on Nov 2007 @ Bucuresti
#13
Please write a tutorial somewhere for mouse support!
__________________
Nokia N810&N800 and SE P990i Owner!
 
Posts: 47 | Thanked: 10 times | Joined on Dec 2007
#14
Originally Posted by penguinbait View Post
If I could just slow the thing down a little.
Maybe you want to reduce the multiplier?...

event.value * 10

try a lower value?

or we're you referring to the polling interval?
 
Posts: 8 | Thanked: 5 times | Joined on Jan 2008
#15
damn, i've just realized that i've uploaded an old version of the mouse polling program, you should obviously remove the
Code:
event.value * 10
which is wrong.

I'm not at home i'll try to upload a better version without this buggy multiplier.

Thanks for the feedbacks. I'll try to make update as soon as possible
 
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#16
Originally Posted by pix View Post
damn, i've just realized that i've uploaded an old version of the mouse polling program, you should obviously remove the
Code:
event.value * 10
which is wrong.

I'm not at home i'll try to upload a better version without this buggy multiplier.

Thanks for the feedbacks. I'll try to make update as soon as possible


I also noticed when my mouse was turned off the application spiked and held at 100%
__________________
To all my Maemo friends. I will no longer be monitoring any of my threads here on a regular basis. I am no longer supporting anything I did under maemo at maemo.org. If you need some help with something you can reach me at tablethacker.com or www.facebook.com/penguinbait. I have disabled my PM's here, and removed myself from Council email and Community mailing list. There has been some fun times, see you around.
 
Posts: 47 | Thanked: 10 times | Joined on Dec 2007
#17
Originally Posted by penguinbait View Post
I also noticed when my mouse was turned off the application spiked and held at 100%
I'll bet read() is returning 0 or -1 resulting in a tight loop.

The following might help:

Code:
int br = read(fd, &event, sizeof (event));
if (br == -1) // this whole block is currently superfluous
{
	if (errno == EAGAIN)
        { usleep(10000); continue; } // new
        else {
            // need a plan - something bad happened
        }
}
if (br != sizeof (event))
{ usleep(10000); continue; } // new
basically it would sleep for 0.1 secs on a syscall restart or bad read.

Question: if br!=0 or -1 and br<sizeof(event) then what? I think 0=>file closed, but are incomplete reads also possible? if so do we need a simple buffer algo?

Last edited by petergunn; 2008-01-20 at 04:02.
 
Posts: 47 | Thanked: 10 times | Joined on Dec 2007
#18
Pix? Any update?
 
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#19
I also just thought of it - I have a bluetooth mouse that managed to pair with the n810 - I'll have to try it on my Qt map (which does display a mouse cursor).
 
Posts: 1,213 | Thanked: 356 times | Joined on Jan 2008 @ California and Virginia
#20
im running into some problems here... When i try to compile the mouse_poll.c program, its throwing a lot of errors, and i cant seem to find out why... Im running as root and have use apt-get install gcc to get the complier, and run the command on the website, but i get errors such as
"stdlib.h: No such file or directory
stdio.h: No such file or directory"
and a lot more...Is it that the C program is calling those functions, and gcc cant find them! (After all the No such file stuff, its has a lot of "First use in this function")
Any idea on how to get it to work (Im not really a programmer, so hopefully a easy solution) Thanks
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:33.