Re: gtk_widget_queue_draw_area much slower in gtk3 than gtk3



On Mon, 2015-03-30 at 13:22 +0100, Emmanuele Bassi wrote:
 * use the event history for the devices you're interested in
 * disable motion event compression on the GdkWindow that you're using
to detect events, and build up the positions you will then draw

Other painting applications opted for the latter solution, so you
should likely explore it first; see the API reference:

For my Gentoo Linux box with gtk+-3.14.9 disabling motion event
compression seems to have no effect currently.

I just took the example program gtk+-3.15.8/examples/drawing.c and added
the two inner lines

gtk_widget_show_all (window);
gdk_window = gtk_widget_get_window(GTK_WIDGET(window));
gdk_window_set_event_compression(gdk_window, FALSE);
gtk_main ();

(I think I have to put it after show all, to ensure that gtk window is
realized and gdk window exists.)

Makes no difference for me -- when I move the mouse pointer fast, I get
separated points but no continuous line. I did a similar tests earlier,
hoped that it would work now with GTK 3.14. I just tested with gimp --
with that tool free hand drawing gives continuous lines instead of
separated points. So my mouse or other input hardware, and X event
handling seems to be not the problem. There must be still some event
filtering of GTK3 involved. Later I may test using event history...



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