Re: Wait cursor animation does not work properly

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

 



On 3 September 2017 at 16:32, Stefan Salewski <mail@xxxxxxxxxxxx> wrote:
> On Sun, 2017-09-03 at 16:43 +0200, Stefan Salewski wrote:
>> Since a few months I have observed that for my chess game the mouse
>> pointer/cursor animation stopped working properly.
>
> Well, I have added the g_idle_add() problem also.
>
> When I move the mouse pointer the first time into the button widget,
> animation works fine. But when I click on the button, animation stops
> while idle function is active, which is 5 seconds. After that period
> animation works fine again.
>
> But when I move the pointer out of the window and back again, animation
> is stopped and will not start again.
>
> May that be a Wayland problem? I do not really think so, but I am not
> really sure.
>
> // gcc t.c `pkg-config --libs --cflags gtk+-3.0`
>
> #include <gtk/gtk.h>
> //include <glib/glib.h>
> #include <glib/gprintf.h>
> static gboolean
> idle_func(gpointer data)
> {
>   int i;
>   i = 0;
>   while (i < 9)
>   {
>     g_usleep(1000000);
>     i++;
>     g_printf("busy\n");
>   }
>   return G_SOURCE_REMOVE;
> }

I don't understand what you're trying to achieve.

You're blocking the toolkit's main loop, here. If your application
does this, it's broken and needs to be fixed - regardless of what the
cursor looks like.

The cursor is rendered by the Wayland compositor, but the animation is
performed by the toolkit, i.e. it's the toolkit that uploads the
cursor's data to the compositor.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux