From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.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: Sun, 11 Mar 2018 18:29:05 +0200 [thread overview]
Message-ID: <83a7vetw32.fsf@gnu.org> (raw)
In-Reply-To: <20180310230706.GB55832@breton.holly.idiocy.org> (message from Alan Third on Sat, 10 Mar 2018 23:07:06 +0000)
> Date: Sat, 10 Mar 2018 23:07:06 +0000
> From: Alan Third <alan@idiocy.org>
> Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com
>
> > > +static int disable_screen_updates_count = 0;
> >
> > Doesn't making this static mean potential trouble if redisplay is run
> > from a non-main thread?
>
> I’m not aware of any problems with global static variables, but I’m
> certainly no expert. What is the risk?
That one thread sets the variable, and another tries to use the value,
believing that it was set by that other thread.
> > Can x_set_window_size be called only from redisplay_internal? If not,
> > doesn't this risk leaving the updates disabled, if x_set_window_size
> > is called from some other place?
>
> No, I believe it’s never called from redisplay_internal.
Then how do we guarantee that these two calls, one from
x_set_window_size, the other from redisplay_internal, will be
balanced, and you never end up with screen updates disabled when you
don't intend?
> But x_set_window_size always leaves the frame blank (and there’s no
> way round that as far as I can see), so there’s not much risk in
> disabling screen updates until redisplay completes. All we’re doing is
> preventing the user from seeing a blank frame.
The question is: can x_set_window_size be called without a redisplay
happening soon enough, e.g. if Emacs is busy doing some lengthy
calculation?
> > Also, redisplay_internal has a few early returns which don't go
> > through end_of_redisplay -- are you sure they can never happen in this
> > situation? For example, what if popup_activated returns non-zero?
>
> Nope. Is there a better place to put it? For example is there a hook
> that runs when redisplay exits?
Unless I'm misremembering, I don't think there is such a hook.
next prev parent reply other threads:[~2018-03-11 16:29 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a7vetw32.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=30699@debbugs.gnu.org \
--cc=aaronjensen@gmail.com \
--cc=alan@idiocy.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).