[comp.windows.x] SUMMARY: Hiding the mouse pointer for text editor

wsineel@wsooti04.info.win.tue.nl (Eelco Vriezekolk) (04/02/91)

I received two answer for my question for a utility to hide
the mouse after a few seconds. None very usefull.

The first suggested to use `click to type' to set the input
focus to a fixed window. You can then move the mouse out of
the way.
The second suggested me to write my own text editor...

I'd still like to have a mouseblanker. And others too. If
someone finds one, please post.

Bye.
-- 
Eelco Vriezekolk, wsineel@win.tue.nl, (+31)40-118338.
 Software engineer looking for career in any civilized country. Software
 development for technical uses. Experience with various programming
 languages, hardware, AI, user interfaces, etc.

john@iastate.edu (Hascall John Paul) (04/03/91)

In article <1854@svin02.info.win.tue.nl> wsineel@info.win.tue.nl writes:
}I received two answer for my question for a utility to hide
}the mouse after a few seconds. None very usefull.

}I'd still like to have a mouseblanker. And others too. If
}someone finds one, please post.

   Use an "empty" mouse bitmap?

John

--
John Hascall                        An ill-chosen word is the fool's messenger.
Project Vincent
Iowa State University Computation Center                       john@iastate.edu
Ames, IA  50011                                                  (515) 294-9551

ekberg@asl.dl.nec.COM (Tom Ekberg) (04/03/91)

 > I received two answer for my question for a utility to hide
 > the mouse after a few seconds. None very usefull.

Perhaps you could define your own mouse cursor which uses a pixmap with no
bits in it.  That is, use XCreatePixmapCursor with a source and mask bitmap
with zeros in them.  When you associate the cursor with a window, this will
effectively hide the mouse for that window until you change the cursor to
something else.

  -- tom, ekberg@asl.dl.nec.com (x3503)

dce@smsc.sony.com (David Elliott) (04/03/91)

In article <1991Apr2.203821.10810@news.iastate.edu> john@iastate.edu (Hascall John Paul) writes:
>In article <1854@svin02.info.win.tue.nl> wsineel@info.win.tue.nl writes:
>}I received two answer for my question for a utility to hide
>}the mouse after a few seconds. None very usefull.
>
>}I'd still like to have a mouseblanker. And others too. If
>}someone finds one, please post.
>
>   Use an "empty" mouse bitmap?

While this is not an incorrect idea, it's not a complete one.

Unlike the Mac graphics world, where there is a single cursor,
and applications are required to change the cursor as needed, the
X cursor is a per-window resource.  That is, each window can have
a different cursor, and the X server is responsible for seeing that
the correct cursor is displayed.

One could modify the X server to "blank" the cursor if no mouse events
are received.

I don't believe that one could write an X client that would do this.
First, there's no universal way I know of finding out when there
have been no mouse events for a certain amount of time.  Second, I
don't believe it's possible to get all of the cursor data so that,
once blanked, the cursor can be restored.

As I suggested to the requestor originally, the best way is to modify the
application to figure out when time has passed, and then change the
cursor to a blank one (created by using an all-0s bitmap for both the
cursor and the mask).  While this does require some modification to
an existing editor, it isn't so drastic as writing a new editor.

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (04/03/91)

Just to be picky....

> [...] change the cursor to a blank one (created by using an all-0s
> bitmap for both the cursor and the mask).

If the mask bitmap is all-0s, it doesn't matter what the cursor bitmap
is.  (Note also that there's no need for the bitmaps to be bigger than
1x1, so be nice to your server and save memory :-)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

ekberg@asl.dl.nec.COM (Tom Ekberg) (04/04/91)

Just to be pickier....
 > Just to be picky....
 > 
 > > [...] change the cursor to a blank one (created by using an all-0s
 > > bitmap for both the cursor and the mask).
 > 
 > If the mask bitmap is all-0s, it doesn't matter what the cursor bitmap
 > is.  (Note also that there's no need for the bitmaps to be bigger than
 > 1x1, so be nice to your server and save memory :-)

If one uses the same pixmap of zeros for both the source and mask then the
server will not need to use any extra memory for the source.

  -- tom, ekberg@asl.dl.nec.com (x3503)