all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com
Subject: bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized
Date: Fri, 9 Mar 2018 23:24:15 +0000	[thread overview]
Message-ID: <20180309232415.GB51893@breton.holly.idiocy.org> (raw)
In-Reply-To: <837eqlwf1i.fsf@gnu.org>

On Fri, Mar 09, 2018 at 03:32:09PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 9 Mar 2018 12:09:52 +0000
> > From: Alan Third <alan@idiocy.org>
> > Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com
> > 
> > SO, I think that the SET_GARBAGED_FRAME call in updateFrameSize is
> > premature, which probably means my original patch is (surprisingly)
> > the correct fix.
> 
> But then what would that fix solve?  The above test in expose_frame is
> not a bug: if the frame is marked as garbaged (and it must be after
> resizing it), then the call to expose_frame cannot possibly DTRT, so
> it exits right away without doing anything.  We should enter redisplay
> soon enough, which will redraw the entire frame.  If anything, then
> the call to expose_frame in the control flow that reacts to frame
> resizing is the one that should be removed, because it's bound to do
> nothing useful.
> 
> If removing SET_FRAME_GARBAGED when the frame is resized seems to
> solve some problem, then you are likely not really resizing the frame,
> or not resizing it significantly enough to show why SET_FRAME_GARBAGED
> is really needed.
> 
> Or maybe I'm just missing something.

When the window manager resizes the frame it blanks its contents out.
This results in a flicker as the full redisplay only happens after the
user sees the blanked frame. Removing, or moving, SET_FRAME_GARBAGED
allows the frame contents to be redrawn before the user sees the blank
frame.

What’s displayed is not correct but it’s shown for such a short time
that it’s not noticable, at least on my machine, and there is no
flicker.

It’s not a perfect solution, but it’s better than what we have at the
moment, IMO.

The other solution I have is to use NSDisableScreenUpdates to prevent
updates being flushed to the screen until after redisplay, but that
completely breaks resizing with the mouse.

If redisplay was able to run during interactive resizing with the
mouse then this would work, but that seems to require the NS code to
run in its own thread, which looks difficult to implement.
-- 
Alan Third





  reply	other threads:[~2018-03-09 23:24 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 17:38 bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized Aaron Jensen
2018-03-04 20:27 ` Alan Third
2018-03-04 21:34   ` Alan Third
2018-03-05  2:06     ` Aaron Jensen
2018-03-05  3:27       ` Eli Zaretskii
2018-03-05  5:21         ` Aaron Jensen
2018-03-05 16:01           ` Eli Zaretskii
2018-03-05 16:21             ` Aaron Jensen
2018-03-05 18:00               ` Eli Zaretskii
2018-03-05 19:23                 ` Alan Third
2018-03-05 19:53                   ` Eli Zaretskii
2018-03-06 22:55                     ` Alan Third
2018-03-07 17:26                       ` Eli Zaretskii
2018-03-07 20:26                         ` Alan Third
2018-03-08 19:15                           ` Eli Zaretskii
2018-03-09 12:09                             ` Alan Third
2018-03-09 13:32                               ` Eli Zaretskii
2018-03-09 23:24                                 ` Alan Third [this message]
2018-03-10  0:25                                   ` Alan Third
2018-03-10  1:18                                     ` Aaron Jensen
2018-03-10  8:30                                     ` Eli Zaretskii
2018-03-10 23:07                                       ` Alan Third
2018-03-11 16:29                                         ` Eli Zaretskii
2018-03-12  0:46                                           ` Alan Third
2018-03-12 16:39                                             ` Eli Zaretskii
2018-03-12 23:42                                               ` Alan Third
2018-03-13 12:19                                                 ` Alan Third
2018-03-13 16:56                                                   ` Eli Zaretskii
2018-03-13 20:18                                                     ` Alan Third
2018-03-13 15:34                                             ` Aaron Jensen
2018-03-14 15:08                                               ` Alan Third
2018-03-19 15:15                                                 ` Alan Third
2018-03-19 15:27                                                   ` Eli Zaretskii
2018-03-19 17:19                                                     ` Alan Third
2018-03-20 21:50                                                       ` Aaron Jensen
2018-03-20 23:22                                                         ` Aaron Jensen
2018-03-21  6:32                                                         ` Eli Zaretskii
2018-03-21 16:27                                                           ` Aaron Jensen
2018-03-10  8:15                                   ` Eli Zaretskii
2018-03-05  7:55     ` Aaron Jensen
2018-03-05 16:12       ` Eli Zaretskii
2018-03-06 23:00       ` Alan Third
2018-03-07 17:26         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180309232415.GB51893@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=30699@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.