[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Problem refreshing a GdkCursor
- From: Patrice St-Gelais <patrice st-gelais oricom ca>
- To: gtk-app-devel-list gnome org
- Subject: Re: Problem refreshing a GdkCursor
- Date: Tue, 07 Oct 2003 20:24:57 +0000
Hi,
Both solutions work. I'll use gdk_flush() because it's shorter.
Thanks a lot!
________________________________________________________-
Owen Taylor a écrit:
> On Mon, 2003-10-06 at 19:14, Patrice St-Gelais wrote:
>
>>Hello,
>>
>>I execute a heavy process in a callback, connected to the "clicked"
>>event of a button.
>>
>>I want to replace the mouse pointer by a watch during the process.
>>
>>Unfortunately, the watch is displayed only after the process, a fraction
>>of second before I reset the pointer to the default arrow.
>>
>>The button stays "pressed" during all the process.
>>
>>I thought the pointer was grabbed, but I put a gtk_grab_get_current in
>>the callback, and it gave 0. I also tried a gdk_pointer_is_grabbed, and
>>it gave 0.
>>
>>I added a new callback connected to the "pressed" event before the
>>"clicked" callback, in which I put the set cursor function, without success.
>>
>>I have no problem setting the cursor elsewhere in the application.
>>
>>I use GTK 1.2.x.
>>
>>Any hint welcome!
>
___________________________________________________
>
> X requests are batched up and not sent to the windowing system
> immediately. gdk_flush() will flush pending calls to the X server.
>
> Regards,
> Owen
>
>
__________________________________________________
> Try adding:
>
> while (gtk_events_pending())
> gtk_main_iteration();
>
> Right after you've changed the mouse pointer.
>
-- Leandro Pereira
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]