-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jan 03, 2007 at 12:18:17PM +0100, [EMAIL PROTECTED] wrote:
> Hello!!

hello!

(please, keep the list CC'ed so that others may lurk/chime-in)

> I'm new in this treatment, but your help is good for me.

Glad it is :)

> I compile your code in a good way, but i want to add a cursor, just being 
> inside
> the window(like the code), but with the option of deleting it,just ,leaving 
> the
> window.

So you just want to hide the cursor? What you do is to create an
invisible pixmap. Instead of:

      GdkCursor *cursor = gdk_cursor_new(GDK_PIRATE);

you can do (Warning: untested code):

      GdkCursor *cursor = gdk_cursor_new_from_pixmap(NULL, /* pixmap */
                                                     NULL, /* mask */
                                                     NULL, /* foreground */
                                                     NULL, /* background */
                                                     0,    /* xoff */
                                                     0);   /* yoff */

> In your code, i can't left main window..
> please, can you help me??

This is supposed to work this way. That's why I warned that "this is a
trap" :-) For a real application, you'd have to make another event
function which releases the grab.

I did it for two reasons: (1) simplicity (I didn't want to complicate the
sample program with irrelevant stuff) (2) to convey that pointer grabs
in X are a sharp tool: use them sparingly or your users will curse at
you (and for very good reasons).

I seem to remember that it was late Netscape 4.x which used to
half-crash, closing all the windows and keeping the grab. Boy, that was
obnoxious.

> thanks a lot

You are welcome
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFm6flBcgs9XrR2kYRAvArAJ4ogflb75SFjCzuFvfJU2qdaHEt+ACfQM7p
xugyedsu/UoYZ0VuC7/eZGA=
=0KpM
-----END PGP SIGNATURE-----

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to