| 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 |
Hello,
I have a customer that is trying to get the mouse cursor to
automatically wrap arround to the opposite side of the screen when they
approach one side... To do this they are using the X$WARP_POINTER
call.
The problem is that sometimes it works and sometimes it doesn't.
(when it doesn't work the cursor just stays on the same side of the
screen instead of wrapping arround to the opposite side).
Before I go too far you should know that they are still using
DECwindows V1.0 FT2
We suspect that the problem has something to do with the input buffer
and that since the X$WARP_POINTER call is simply just requesting a new
cursor position if it doesn't happen quickly enough and the mouse is
still in motion another location coordinate will end up in the buffer
and the cursor won't move.
Is this what is happening and if so how can they ensure that the
X$WARP_POINTER is the last cusor position in the buffer until the
cursor is actually moved?
Thanks in advance for any and all help.
Peter Lamb
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1262.1 | TSC stumped too (for now anyway) | WR2FOR::LAMB_PE | Peter Lamb - FSG Santa Clara | Wed Aug 16 1989 01:14 | 38 |
Mmmm no replies to this so far...
I also have the TSC working on it and they thought they had it
pinpointed to a problem with the mouse driver and the way it does
positioning compression. The idea being that with compression on
the input buffer doesn't see all of the mouse positions and therefor
doesn't always know when the mouse leaves a window and therefor
won't always generate an INTER_Notify event (this is what the customer
is keying off of to know when to do the X$WARP_POINTER).
As I said they thought they had it solved however the customer claims
that they always get the inter_notify event because their code is
doing other things when the inter_notify occurs its just that the
X$WARP_POINTER isn't happening...
To give a little bit more clarification. The customer wants to
wrap the mouse to the opposite side of the screen every time the
mouse nears the left side of the screen. To know this they have
two windows the first window is the entire screen and the second
(top) window is the entire screen except for a 1 pixel column going
down the left side of the screen. In theory when the cursor is
moved to that last column an inter_notify event should be generated
indicating that the mouse has left the top window. The customer then
does some other things and then calls X$WARP_POINTER. Depending
on the speed of the mouse movement this sometimes works and sometimes
doesn't. When it doesn't work is typically when the mouse is moved
quickly to the left side of the screen and when it dosn't work the
mouse just ends up sticking on the left side and won't jump to the
right.
I realize this is a complicated problem and I have probably gone
on too long but if anyone can shed any light on this it would be
greatly appreciated.
Sincerely,
Peter Lamb
| |||||
| 1262.2 | You could let the driver do it? | STAR::BMATTHEWS | Thu Aug 17 1989 15:23 | 150 | |
There may be another way to accomplish what you want. The following is a
program which will cause the cursor to wrap around the screen. Move the cursor
off the right of the screen and it will show up on the left of the screen and
vice versa. This uses qiow's to the driver in the same fashion the server does
to implement cursor jumping from screen to screen in multi-head support. Good
luck.
#include <iodef>
#include <ssdef>
#include <descrip>
#include <lnmdef>
#include <lib$routines>
#include <starlet>
typedef struct _itemlist
{
short bufferLen;
short itemCode;
char *bufferAddress;
int *returnLength;
} itemlist;
static $DESCRIPTOR (DEVNAM, "DECW$SERVER_SCREENS");
static $DESCRIPTOR(SERVER0,"DECW$SERVER0_TABLE");
static $DESCRIPTOR(first_dev,"xxxx");
static $DESCRIPTOR(last_dev,"xxxx");
/* */
/* DECwindows Driver for SETMODE of ATTACH_SCREEN call. */
/* The following are different parameters allowed by */
/* attach screen. Thus the prefix "DECW_AS_". */
/* */
#define IO$K_DECW_AS_TO_INPUT 2
#define IO$K_DECW_AS_TO_RIGHT 3
#define IO$K_DECW_AS_TO_LEFT 4
#define IO$K_DECW_AS_TO_TOP 5
#define IO$K_DECW_AS_TO_BOTTOM 6
/* */
/* QIO function codes, modifiers and submodifiers */
/* */
/* */
/* DECwindows Driver SENSEMODE and SETMODE function modifier codes */
/* */
#define IO$K_DECW_CURSOR_ASSOC 2
#define IO$K_DECW_ENABLE_INPUT 3
#define IO$K_DECW_BUTTON_INFO 4
#define IO$K_DECW_CURSOR_COLOR 5
#define IO$K_DECW_CURSOR_PATTERN 6
#define IO$K_DECW_CURSOR_POSITION 7
#define IO$K_DECW_DEVICE_INFO 8
#define IO$K_DECW_KB_INFO 9
#define IO$K_DECW_MOTION_BUFFER 10
#define IO$K_DECW_POINTER_FILTER_BOX 11
#define IO$K_DECW_POINTER_INFO 12
#define IO$K_DECW_OPWIN_KEY 13
#define IO$K_DECW_SCREEN_SAVER 14
#define IO$K_DECW_KB_LED 15
#define IO$K_DECW_RING_BELL 16
#define IO$K_DECW_ATTACH_SCREEN 17
#define IO$K_DECW_PMOUSE_KEY 18
#define IO$K_DECW_PTR_ACCEL 19
#define IO$K_DECW_MOTION_COMP 20
#define IO$K_DECW_MOTION_BUFFER_INIT 21
#define IO$K_DECW_CURSOR_BOUNDRIES 22
main()
{
unsigned long int condValue; /* VMS condition value */
unsigned short int iosb[4]; /* i/o status block */
unsigned short int chan;
int index;
int maxIndex;
int temp,size;
itemlist crelnm_itemlist[20];
itemlist trnlnm_itemlist[3];
itemlist *crelnm_listptr;
char lognam_buffer[2048];
trnlnm_itemlist[1].itemCode = LNM$_MAX_INDEX;
trnlnm_itemlist[1].bufferAddress = &maxIndex;
trnlnm_itemlist[1].returnLength = &temp;
trnlnm_itemlist[1].bufferLen = 4;
trnlnm_itemlist[2].itemCode=trnlnm_itemlist[2].bufferLen=0;
condValue = sys$trnlnm(0,&SERVER0,&DEVNAM,0,&trnlnm_itemlist[1]);
if (condValue != SS$_NORMAL)
{
PrintF("Couldn't translate logical name\n");
lib$stop(condValue);
return;
}
/*
* Get first device
*/
index = 0;
trnlnm_itemlist[0].returnLength = &temp;
trnlnm_itemlist[0].itemCode = LNM$_INDEX;
trnlnm_itemlist[0].bufferLen = 4;
trnlnm_itemlist[0].bufferAddress = &index;
trnlnm_itemlist[1].bufferLen = 4;
trnlnm_itemlist[1].itemCode = LNM$_STRING;
trnlnm_itemlist[1].bufferAddress = first_dev.dsc$a_pointer;
trnlnm_itemlist[1].returnLength = &size;
trnlnm_itemlist[2].itemCode = trnlnm_itemlist[2].bufferLen = 0;
condValue = sys$trnlnm(0,&SERVER0,&DEVNAM,0,&trnlnm_itemlist[0]);
if (condValue != SS$_NORMAL)
{
PrintF("Couldn't translate logical name\n");
lib$stop(condValue);
return;
}
/*
* Get last device
*/
index = maxIndex;
trnlnm_itemlist[0].returnLength = &temp;
trnlnm_itemlist[0].itemCode = LNM$_INDEX;
trnlnm_itemlist[0].bufferLen = 4;
trnlnm_itemlist[0].bufferAddress = &index;
trnlnm_itemlist[1].bufferLen = 4;
trnlnm_itemlist[1].itemCode = LNM$_STRING;
trnlnm_itemlist[1].bufferAddress = last_dev.dsc$a_pointer;
trnlnm_itemlist[1].returnLength = &size;
trnlnm_itemlist[2].itemCode = trnlnm_itemlist[2].bufferLen = 0;
condValue = sys$trnlnm(0,&SERVER0,&DEVNAM,0,&trnlnm_itemlist[0]);
if (condValue != SS$_NORMAL)
{
PrintF("Couldn't translate logical name\n");
lib$stop(condValue);
return;
}
condValue = sys$assign (&first_dev, &chan, 0, 0);
if (condValue != SS$_NORMAL)
{
PrintF("Couldn't assign channel to DECW$SERVER_SCREENS\n");
lib$stop(condValue);
return;
}
condValue = sys$qiow (0, chan,
IO$_SETMODE,
&iosb, 0, 0,
IO$K_DECW_ATTACH_SCREEN,
IO$K_DECW_AS_TO_RIGHT,
&last_dev, 0, 0, 0) ;
if (condValue != SS$_NORMAL)
{
PrintF("\nAttach screen failed %d", condValue) ;
lib$stop(condValue);
return;
}
}
| |||||