Bug 28132 - Repaint cheeze with editor bottom right corner
Summary: Repaint cheeze with editor bottom right corner
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 105367 109048 113450 126952 132114 135181 158470 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-11 15:27 EST by Kevin McGuire CLA
Modified: 2021-06-24 04:56 EDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McGuire CLA 2002-12-11 15:27:40 EST
I've noticed this on both my home and work WinXP installs, for latest 
integration build (1210).

1. open the eclipse workbench
2. open an editor
3. place another browser (e.g. Internet Explorer) overtop the workbench
4. move the second browser around such that the bottom right corner of the 
editor (where the scroll bars meet) is partially exposed 

The result is horizontal lines left in the bottom right editor box which 
appear to be the border of the top browser.  Its only true for horizontal 
browser edges, not vertical.
Comment 1 Steve Northover CLA 2004-10-18 22:02:14 EDT
Happens to Notepad.exe too.  It's a bug in Windows that we can't work around 
(we don't get notification when the window trimming is painted).
Comment 2 Steve Northover CLA 2005-08-10 15:08:55 EDT
*** Bug 105367 has been marked as a duplicate of this bug. ***
Comment 3 Billy Biggs CLA 2005-10-22 11:39:38 EDT
*** Bug 113450 has been marked as a duplicate of this bug. ***
Comment 4 Veronika Irvine CLA 2006-02-10 10:09:06 EST
*** Bug 126952 has been marked as a duplicate of this bug. ***
Comment 5 Steve Northover CLA 2006-03-16 10:19:08 EST
*** Bug 132114 has been marked as a duplicate of this bug. ***
Comment 6 Steve Northover CLA 2006-04-06 09:36:31 EDT
*** Bug 135181 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2006-09-25 03:18:01 EDT
*** Bug 158470 has been marked as a duplicate of this bug. ***
Comment 8 Florian Priester CLA 2006-09-25 04:13:22 EDT
Test snippet for the case from bug 158470 (XP Theme only):

---

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class ScrollBarCornerTest {
  public static void main(String[] args) {
    Display display = new Display();
    
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    
    Table tbl = new Table(shell, SWT.VIRTUAL);
    tbl.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event e) {
        TableItem item = (TableItem) e.item;
        String str = " ...this is supposed to be a long sample text";
        item.setText("Item " + e.index + ((e.index < 10) ? "" : str));
      }
    });
    tbl.setItemCount(100);
    
    shell.setSize(150, 150);
    shell.open();
    
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) display.sleep();
    }
    
    display.dispose();
  }
}

---

To reproduce, click on the arrow-down button until a horizontal scroll bar
appears.
Comment 9 Ed Burnette CLA 2007-06-12 11:56:31 EDT
(WinXP SP2)
Notepad keeps painting it's little resize grabber over the damaged area so it's hard to reproduce there. You can make MS File Explorer show the problem but it's difficult because it doesn't leave the scrollbars on when they're not needed.

However, I was completely unable to duplicate it in the Textpad editor, which sure looks like it's using native widgets, though it does have a splitter to the left of the bottom scrollbar. Internet Explorer 7 does not show the problem either. Firefox 2 does not show the problem. All three apps have both scrollbars on just like Eclipse. 

I'd like to request this be reopened and investigated because it makes Eclipse and RCP apps look bad in common cases, and several native apps have found a way around the problem.
Comment 10 Steve Northover CLA 2008-02-21 14:04:19 EST
Ok, I'm sick of this bug.
Comment 11 Steve Northover CLA 2008-02-21 14:08:43 EST
Fixed > 20080221
Comment 12 Ed Burnette CLA 2008-02-21 17:03:43 EST
Cool, I'm curious how you fixed it.
Comment 13 Steve Northover CLA 2008-02-21 17:58:50 EST
The problem was that the operating system didn't draw it every time.  I drew it myself in WM_NCPAINT and let the operating system draw on top of me (or not).  Note that Vista doesn't have the problem.
Comment 14 Markus Keller CLA 2008-02-22 10:10:55 EST
Cool, thanks for cleaning up that stinky cheese!

> I drew it myself in WM_NCPAINT

I guess that explains why it still does not work for the corner case of a degenerate Composite with a zero-size client area (like in bug 219139).
Comment 15 Steve Northover CLA 2008-02-22 10:17:04 EST
Nope, it sounds more like I have a bug.
Comment 16 Markus Keller CLA 2009-10-01 08:33:00 EDT
*** Bug 109048 has been marked as a duplicate of this bug. ***