emacs-devel
[Top][All Lists]
Advanced

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

Re: Redisplay problems?


From: Eli Zaretskii
Subject: Re: Redisplay problems?
Date: Fri, 21 Mar 2014 12:29:11 +0200

> Date: Fri, 21 Mar 2014 10:51:22 +0100
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden, address@hidden, 
>  address@hidden, address@hidden
> 
>  >> But wasn't the whole idea of maintaining an "obscured" state to not
>  >> update the glyph matrices when a change occurs while the frame is
>  >> obscured but instead to wait until the frame gets exposed again?
>  >
>  > Maybe so, but then what exactly is the problem we are discussing here?
>  > If the current glyph matrices are not up to date, marking the frame
>  > "garbaged" is the only way to redisplay it.
> 
> Pretty early in this thread you stated
> 
>     Not reproducible here, but I'm not on GNU/Linux with GTK+.
> 
> and I proposed a fix to do on GNU/Linux what we do on Windows but Stefan
> considered that too heavy because it sets a frame garbaged even when it
> was only iconified for some short period and its contentes didn't change
> at all.  So Stefan committed another fix for GNU/Linux and now proposes
> to backport a similar fix to Windows.  And I can't tell much because the
> semantics of "garbaged" are still eluding me.

I think the solution to Stefan's concerns is to set some flag, perhaps
the frame's redisplay flag, when we bump into an iconified frame
inside redisplay_internal.  And in fact we already do that:

  /* Build desired matrices, and update the display.  If
     consider_all_windows_p is non-zero, do it for all windows on all
     frames.  Otherwise do it for selected_window, only.  */

  if (consider_all_windows_p)
    {
      FOR_EACH_FRAME (tail, frame)
        XFRAME (frame)->updated_p = 0;

      propagate_buffer_redisplay ();

      FOR_EACH_FRAME (tail, frame)
        {
          struct frame *f = XFRAME (frame);
   ...
          if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
            {
   ...
              if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
                redisplay_windows (FRAME_ROOT_WINDOW (f));
              /* Remember that the invisible frames need to be redisplayed next
                 time they're visible.  */
              else if (!REDISPLAY_SOME_P ())
                f->redisplay = true; <<<<<<<<<<<<<<<<<<<<<<<<<<<

So it is unclear to me why there are problems with such frames: their
redisplay flag should already be set when the contents changed, and
reset otherwise.

So why do we need to change anything at all?  A new frame starts with
its garbaged flag set, so it should have been redrawn completely when
it becomes visible the first time.  If that flag is reset, the culprit
might be in the code which resets that flag.  Or maybe
consider_all_windows_p is zero in this case.

I guess some more debugging is in order, because I don't understand
the problem.

Also, I wonder if there are any real-life use cases that trigger this
problem, because the original recipe sounds artificial to me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]