bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: scrollbar (no toolkit) display bug


From: Gerd Moellmann
Subject: Re: scrollbar (no toolkit) display bug
Date: 29 Oct 2001 12:21:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

raphael.berbain@bigfoot.com (Raphaël Berbain) writes:

> Ok, I just tried your patch.  I am sorry to say that it's better, but
> not perfect yet.  But hey, it's coming closer.  Here is the recipe:

Thanks, Raphaël.  Could you please try this one?

Index: xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.517
retrieving revision 1.518
diff -c -r1.517 -r1.518
*** xfns.c      2001/10/28 20:55:50     1.517
--- xfns.c      2001/10/29 11:18:51     1.518
***************
*** 1935,1940 ****
--- 1935,1942 ----
        SET_FRAME_GARBAGED (f);
        do_pending_window_change (0);
      }
+   else
+     SET_FRAME_GARBAGED (f);
  }
  
  void

*** xterm.c.~1.673.~    Mon Oct 29 10:41:47 2001
--- xterm.c     Mon Oct 29 12:14:01 2001
***************
*** 769,801 ****
       struct glyph_row *desired_row;
  {
    struct window *w = updated_window;
    
    xassert (w);
    
    if (!desired_row->mode_line_p && !w->pseudo_window_p)
      {
-       struct frame *f;
-       int width;
-       
        BLOCK_INPUT;
        x_draw_row_bitmaps (w, desired_row);
  
!       /* When a window has disappeared, make sure that no rest of
!        full-width rows stays visible in the internal border.  */
!       if (windows_or_buffers_changed
!         && (f = XFRAME (w->frame),
!             width = FRAME_INTERNAL_BORDER_WIDTH (f),
!             width != 0))
!       {
!         int height = desired_row->visible_height;
!         int x = (window_box_right (w, -1)
!                  + FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f));
!         int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
! 
!         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
!                       x, y, width, height, False);
!       }
        
        UNBLOCK_INPUT;
      }
  }
--- 769,812 ----
       struct glyph_row *desired_row;
  {
    struct window *w = updated_window;
+   struct frame *f;
+   int width;
    
    xassert (w);
    
    if (!desired_row->mode_line_p && !w->pseudo_window_p)
      {
        BLOCK_INPUT;
        x_draw_row_bitmaps (w, desired_row);
+       UNBLOCK_INPUT;
+     }
+       
+   /* When a window has disappeared, make sure that no rest of
+      full-width rows stays visible in the internal border.  Could
+      check here if updated_window is the leftmost/rightmost window,
+      but I guess it's not worth doing since vertically split windows
+      are almost never used, internal border is rarely set, and the
+      overhead is very small.  */
+   if (windows_or_buffers_changed
+       && desired_row->full_width_p
+       && (f = XFRAME (w->frame),
+         width = FRAME_INTERNAL_BORDER_WIDTH (f),
+         width != 0))
+     {
+       int height = desired_row->visible_height;
+       int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
  
!       /* Internal border is drawn below the tool bar.  */
!       if (WINDOWP (f->tool_bar_window)
!         && w == XWINDOW (f->tool_bar_window))
!       y -= width;
        
+       BLOCK_INPUT;
+       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                   0, y, width, height, False);
+       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                   f->output_data.x->pixel_width - width,
+                   y, width, height, False);
        UNBLOCK_INPUT;
      }
  }



reply via email to

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