Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Cursor control Message-ID: <9007010803.AA06376@Larry.McRCIM.McGill.EDU> Date: 1 Jul 90 08:03:50 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 44 > I have a problem that perhaps someone can answer. I wish to make the > cursor temporarily disappear. My current efforts have been foiled > because X seems to keep around an image of what's under the cursor. > Here is the situation: > I'm using a Sun SPARCstation 1+ (8-bit color) > X11R4 > I'm calling a function that apparently uses low-level pixrect calls > to move images around inside a box. Ouch. You're going to have trouble, then; X assumes it owns the frame buffer and won't get along with programs that scribble on it behind X's back. > [T]he problem is this: When I click on a spot, the function copies a > piece of the image on top of where my cursor was. When I move the > mouse, what used to be under the cursor is restored, leaving a cookie > on the screen. Yup. If the program did the copy via X instead of the pixrect library, there'd be no problem. (The program is clearly getting its mouse clicks via X; do you have any idea why it's being so silly as to blit pieces of the raw framebuffer around?) > Xterm appears to get around this problem nicely. Does anybody know > how it does it? When xterm wants to copy a piece of the screen around, it uses XCopyArea instead of pr_rop. This is portable, works across the network, *and* interacts properly with the pointer image, because the X server is what actually performs the copy, meaning it can erase the pointer image for the duration of the copy if necessary. If you have source, I'd recommend that you fix it to do the copies properly, with XCopyArea, instead of by pr_rop()ing pieces of the framebuffer around behind the X server's back. If you don't have source, there's not much you can do except complain to whoever gave you a program with such a twisted misfeature in it. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu