Re: how to display "busy" cursor ? and another question
- From: jcupitt gmail com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to display "busy" cursor ? and another question
- Date: Mon, 6 Oct 2008 14:34:01 +0100
2008/10/4 Allin Cottrell <cottrell wfu edu>:
Something like this, maybe:
I do this with something very similar. In pseudo-code:
set_up_my_application():
GdkCursor *busy_cursor = gdk_cursor_new(GDK_WATCH);
long_action():
for all windows:
gdk_window_set_cursor(GTK_WIDGET(window)->window, busy_cursor);
gdk_flush();
do something that takes a while
for all windows:
gdk_window_set_cursor(GTK_WIDGET(window)->window, NULL);
gdk_flush();
In other words, use flush() rather than display_sync() to get the
cursor to update, since we can vaoid a round-trip, and make the cursor
once when we set up the application and use it for all windows.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]