[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Cursor doesn't change on Windows
- From: "Issac Trotts" <ijtrotts ucdavis edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: Cursor doesn't change on Windows
- Date: Thu, 22 Jul 2004 16:00:20 -0700
On Thu, Jul 22, 2004 at 04:54:04PM -0400, Todd Fisher wrote:
> Issac Trotts wrote:
>
> >This code works fine on Debian but has no effect on Windows:
> >
> > GdkCursor *translation_cursor=NULL;
> > ...
> > translation_cursor=gdk_cursor_new(GDK_FLEUR);
> > ...
> > gdk_window_set_cursor(gtk_widget_get_root_window(gl_area),
> > translation_cursor);
> >
> >The Windows version of Gimp changes cursors all the time, proving that
> >it can be done. It makes me wonder what I'm doing wrong, or not doing.
> >
> It might be that you need to do something like:
> while( gtk_events_pending() )
> gtk_main_iteration_do( FALSE );
> after calling gdk_window_set_cursor( (GdkWindow*)window, cursor );
> I noticed on windows to change the cursor the event main loop needs to
> be run but not in linux.
I just got it to work by changing
gtk_widget_get_root_window(gl_area)
to
gl_area->window
Thanks to both who replied.
Issac
--
Issac Trotts
Programmer, NIMH Human Brain Project
University of California, Davis
http://mallorn.ucdavis.edu/conexus
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]