Re: [directfb-dev] Mouse pointer ..............

I'm not sure this will work, as gdk_cursor_new_from_pixmap() is badly implemented in gdkdfb (see bug 330420).



Pedro Aguilar wrote:

You can do it directly with GDK too.
In this way you can show/hide the cursor whenever you want.
Here's a sample code that worked for me:

GtkWidget *widget;
gchar     bits[] = {0};
GdkColor  color = {0, 0, 0, 0};
GdkPixmap *pixmap;
GdkCursor *cursor;

gtk_init (&argc, &argv);
widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);

pixmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap, &color, &color, 0, 0);


gdk_window_set_cursor(widget->window, cursor);

gtk_main ();

Pedro Aguilar

That will work also.
The gdk/x11 way is a clear cursor.

Both should work.

On 11/9/06, Attilio Fiandrotti <attilio fiandrotti gmail com> wrote:

I can make the cursor to disapper by simply adding "no-cursor" to the
directfbrc [1] file, is there a chance this may not work in some cases?
If this should not work, you could try moving the mouse to the
bottm-right corner of the screen.




Mike Emmel wrote:

Good question I'd say try setting the pointer pixmap to a clear ARGB


But I'm not sure that actually works some support was added for custom
cursors but I've not used it.

On 11/9/06, rafeeqh shaik <shaik rafeeqh gmail com> wrote:


I am trying to run gtk+ on DirectFB applications for embedded device.
when i run application i am getting mouse pointer on top of the


I am not using mouse so i want mouse pointer to be invisble.

could any one plz throw some light how to disable the mouse pointer,


gtk-devel-list mailing list
gtk-devel-list gnome org

gtk-devel-list mailing list
gtk-devel-list gnome org

gtk-devel-list mailing list
gtk-devel-list gnome org

directfb-dev mailing list
directfb-dev directfb org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]