Fix flickering
authorJames Cameron <quozl@laptop.org>
Thu, 2 Apr 2020 12:46:29 +0000 (13:46 +0100)
committerSebastien Bacher <seb128@ubuntu.com>
Thu, 2 Apr 2020 12:46:29 +0000 (13:46 +0100)
commitee6f570e3853fe3a05e317a412d85bc7e60223b0
tree82db4cface667447f7b01a43a917557bb441a59c
parentaac6fb6bb40d1e69656d8fe34a47d47cfd80c35c
Fix flickering

Origin: other
Bug: https://bugzilla.abisource.com/show_bug.cgi?id=13791
Bug-SugarLabs: https://bugs.sugarlabs.org/ticket/4915
Bug-Ubuntu: https://pad.lv/1574278
Last-Update: 2017-09-24

- in GR_Caret::s_blink_timeout, avoid repeated calls by stopping the
  timer, it will be restarted when needed,

- in GR_Caret::s_enable, avoid extra unnecessary _blink calls when blink
  is enabled, as they serve no purpose,

- in XAP_UnixFrameImpl::_fe::expose, use the Cairo clip rectangle
  instead of the expose event area, thanks to Hubert Figuière in
  865c1dda7e13deff04573ffc42028b71fee07f9c,

- in XAP_UnixFrameImpl::_fe::expose, do not return FALSE, as other
  handlers will need to handle the draw event,

- in GR_UnixCairoGraphics::flush, fix excessive draw events;
  gtk_widget_queue_draw only marks the widget as needing redrawing,
  which causes a draw event for each call to flush, therefore every
  caret blink, so use gdk_flush instead,

Gbp-Pq: Name fix-flickering.patch
src/af/gr/gtk/gr_UnixCairoGraphics.cpp
src/af/gr/xp/gr_Caret.cpp
src/af/xap/gtk/xap_UnixFrameImpl.cpp