LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-24-2007, 07:45 AM   #1
dipk_23
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: 0
Exclamation Need justification for mouse scroll release event


Hi All,
I just came across a logical problem i m having in one of my module. I have to emulate All mouse events (Right-Middle-Left buttons press/release and scroll up/down events handling).
I am using SuSE-10.2 and application is QT based and i m using XTest library function XTestFakeButtonEvent for emulating mouse events. Untill the handling of "Right-Middle-Left" buttons "press/release" events all things were fine. But the logical thing start from wheel event processing. To Make Mouse Scroll event up & down i used following code respectively.

_XDisplay *XDsp = XOpenDisplay(NULL);

...blah
..blah
.blah

XTestFakeButtonEvent (XDsp, Button4,1, CurrentTime);// Scroll Up Press
XTestFakeButtonEvent (XDsp, Button5,1, CurrentTime);// Scroll Down Press

Technically it is necessary to call corresponding Scroll up & down Release functions after each of the above call. e.g.

1---> XTestFakeButtonEvent (XDsp, Button4,1, CurrentTime); // Scroll Up Press
2---> XTestFakeButtonEvent (XDsp, Button4,0, CurrentTime); // Scroll Up Release

3---> XTestFakeButtonEvent (XDsp, Button5,1, CurrentTime); // Scroll Down Press
4---> XTestFakeButtonEvent (XDsp, Button5,0, CurrentTime); // Scroll Down Release

But my question is. What above two calls does actually and when the scroll release event occurs? i.e. Why the code doesn't run as intended when i comment out both release event function calls(line 2 and 4).
I am just looking for the justification of placing scroll RELEASE event for scroll up/down events just after scroll PRESS event.

Thanks in advance
Deepak Chanalia
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse Scroll Button doesn't work with Logitech PS/2 MOuse. duffmckagan Slackware 10 12-02-2008 11:27 PM
Key relese event on multimedia keyboard (scroll wheel) p8p Linux - Hardware 0 02-27-2005 06:13 AM
USB scroll mouse doesn't scroll Rhatlinux Linux - Software 10 09-29-2004 07:42 PM
Scroll feature in Logitech Scroll mouse does not work ssmaitra Linux - Hardware 6 11-11-2003 07:43 AM
How can i get the mouse event on gtk_drawing_area? HopeCao Programming 1 03-19-2003 03:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration