Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
Hi Xtechs, thought I'de try something simple and came up against a brick wall. How do you read/find the current value of the mouse/pointer within a window? I looked thru all the likely routines and the closest I came to a solution was the motion notify event or a button press event. But this is not what I want! You see the application would like to know at any time where the mouse is pointing (assuming that the mouse is over an application owned window) at any time and not just when a mouse is clicked or the mouse is moved. In other words I need to know where the mouse is even if it is doing nothing and not creating any events. Any ideas, Walter Zambotti.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2177.1 | XQueryPointer | OPHION::MIKEY | Mike Yang | Thu Feb 01 1990 01:16 | 3 |
Use the Xlib routine XQueryPointer to find the pointer position whenever you want/need it. | |||||
2177.2 | Thankyou Very Much! | WPOMM2::ZAMBOTTI | Thu Feb 01 1990 03:00 | 7 | |
You wont believe how many times (or for how long) you can look in the the wrong sections of the Xlib manual. Much appreciated, Walter. | |||||
2177.3 | Most applications should use event info | SDSVAX::SWEENEY | Patrick Sweeney in New York | Thu Feb 01 1990 10:27 | 12 |
XQueryPointer generates a round-trip since the protocol request returns a reply and not an event, this is not the optimum case. Most applications should be satisfied to obtain the x and y of the pointer from the event data structure. The unusual case would be where the pointer location was being polled every n time units. An application that I was working on for Xlib=>XUI conversion actually put an XQueryPointer into its button press event handler routine. So be careful. |