all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: martin rudalics <rudalics@gmx.at>
Cc: Juanma Barranquero <lekktu@gmail.com>, 16967@debbugs.gnu.org
Subject: bug#16967: frame related race condition
Date: Wed, 12 Mar 2014 10:06:18 -0400	[thread overview]
Message-ID: <jwv1ty75xqd.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <531EC439.7050803@gmx.at> (martin rudalics's message of "Tue, 11 Mar 2014 09:07:21 +0100")

>   /* Nonzero if the frame is currently displayed; we check
>      it to see if we should bother updating the frame's contents.

>      On ttys and on Windows NT/9X, to avoid wasting effort updating
>      visible frames that are actually completely obscured by other
>      windows on the display, we bend the meaning of visible slightly:
>      if equal to 2, then the frame is obscured - we still consider
>      it to be "visible" as seen from lisp, but we don't bother
>      updating it.  */
>   unsigned visible : 2;

Hmm... I didn't realize this "visible=2" is also used in the Windows GUI.
So maybe the "visible=2" case under Windows is indeed mishandled by the
"redisplay bit" code.  Or by some other part of the code.

At least frame.h does:

   SET_FRAME_VISIBLE (struct frame *f, int v)
   {
     eassert (0 <= v && v <= 2);
     if (v == 1 && f->visible != 1)
       redisplay_other_windows ();
     f->visible = v;
   }

so it should handle the w32 case correctly.

> is likely responsible for the fact that Emacs doesn't always redisplay a
> frame when I remove the window of another application obscuring it.  I'm
> still convinced that we should call SET_FRAME_VISIBLE, at least when
> f->visible equals 2, in SIZE_RESTORED.

I'm not sure what SIZE_RESTORED is for, but indeed when we receive
a size-change notification, the "visible=2" optimization might not be
valid any more so we should set it back to 1.

And we should probably also set it back to 1 when we receive expose
events on that frame.

But I'm generally clueless about GUI code, and even more clueless about
w32, so please don't take my word for it.

> BTW: The more I look into this, the more I'm convinced that implementing
> frame parameters on top of the old frame infrastructure was one of the
> worst design ideas ever.

I have no idea what this is referring to.


        Stefan





  parent reply	other threads:[~2014-03-12 14:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 16:19 bug#16967: frame related race condition Juanma Barranquero
2014-03-10  9:04 ` martin rudalics
2014-03-10 10:32   ` martin rudalics
2014-03-10 11:08     ` Juanma Barranquero
2014-03-10 11:45       ` martin rudalics
2014-03-10 12:39         ` Juanma Barranquero
2014-03-10 13:11           ` martin rudalics
2014-03-10 14:48             ` Juanma Barranquero
2014-03-10 19:04               ` martin rudalics
2014-03-10 21:18                 ` Juanma Barranquero
2014-03-11  8:07                   ` martin rudalics
2014-03-11 21:13                     ` Juanma Barranquero
2014-03-12 14:06                     ` Stefan Monnier [this message]
2014-03-14 11:31                       ` martin rudalics
2014-03-14 13:32                         ` Stefan Monnier
2014-03-11  1:33             ` Stefan Monnier
2014-03-11  8:07               ` martin rudalics
2019-10-02  1:47 ` Juanma Barranquero

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=jwv1ty75xqd.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=16967@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=rudalics@gmx.at \
    /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.