Re: Input event reduction
- From: Stefan Salewski <mail ssalewski de>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: Input event reduction
- Date: Wed, 29 Mar 2017 21:27:48 +0200
On Wed, 2017-03-29 at 16:47 +0200, Stefan Salewski wrote:
On Wed, 2017-03-29 at 09:42 +0200, Stefan Salewski wrote:
It is still the old problem:
Well, after some thinking I have the feeling that it may work with
only
an idle function, so no separate thread and message passing is
necessary: The callback set a flag indicating that there is work to
do,
and calls the idle function unless the idle function is still
working.
That idle functions has an outer loop, which tests the flag and
returns
if unset. Otherwise it clears the flag and does the work. Will test
soon...
Yes, basically that works fine.
Problem is the idle function added with
https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-idle-add
I have the strong feeling, that the provided function is not running
silently in the background, but it is just called at some point and
then blocks user input until the function terminates. At least, when
that function is added with g-idle-add on GtkTextBuffer changed signal
and that functions does only a delay of 2000 ms, then for that time
user input into text buffer is blocked.
That was not what I expected. And it is bad, user input becomes a bit
sluggish.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]