Bug 134391 - [Browser] Reduce flicker when quickly hovering over code
Summary: [Browser] Reduce flicker when quickly hovering over code
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-01 19:15 EST by Benjamin Pasero CLA
Modified: 2019-09-06 16:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Pasero CLA 2006-04-01 19:15:00 EST
Version: 3.2.0
Build id: I20060331-2000

When quickly hovering over code the Browser-Hover switches its content quite a lot. Sometimes you can see a white-background which most likely results from a call to Browser#setText(""). 

Compared to the hold StyledText hover, this white-background is bringing some flickering (at least for me its defnitly more visual than with the StyledText hover).

Maybe this could be relaxed with setting the background of the Hover to the Tooltip color, or not setting the text to an empty String at all?

Ben
Comment 1 Dani Megert CLA 2006-04-02 11:33:33 EDT
I don't see this on WindowsXP. Do you have a test case?
Comment 2 Dani Megert CLA 2006-04-02 11:56:46 EDT
We do set the background. I'll have to check whether we missed one place.
Comment 3 Benjamin Pasero CLA 2006-04-02 15:24:40 EDT
No I dont have a test-case other than simply hovering over Methods and Fields of a Class, like:

public class Main {
  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());

    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
  }
}

Moving the cursor around I can see the busy-cursor very frequently. 

Actually I am not totally sure if the background shows in white sometimes, its really hard to spot. When I find a better test-scenario, I will let you know.

Ben
Comment 4 Dani Megert CLA 2006-04-03 03:30:10 EDT
What you probably notice is the flickering of the cursor due to bug 134390. I see that too.
Comment 5 Dani Megert CLA 2006-04-05 08:08:40 EDT
Sometimes we see a white background (can also be seen when opening the Javadoc view the first time) and this even though we call Browser.setText(...) before the widget is visible and the text contains the color to be used.

Moving to SWT - there's not much we can do.
Comment 6 Steve Northover CLA 2006-04-05 10:31:02 EDT
Not sure there's much we can do if the operating system is filling with white.
Comment 7 Benjamin Pasero CLA 2006-04-05 11:50:21 EDT
I think calling setText makes the browser load the text asynchronious to the callee. Maybe delaying the call to setVisible by some milis makes things better?

Ben
Comment 8 Dani Megert CLA 2006-04-06 03:19:49 EDT
I hope you're not suggesting to do this for all clients.
Also note that calling Browser.setBackground(Color) has not effect.
Comment 9 Benjamin Pasero CLA 2006-04-06 04:14:16 EDT
No, its would just be a temp. solution for the case of the Eclipse Hover, if no other solution was possible in the 3.2 stream.

Ben
Comment 10 Dani Megert CLA 2006-04-06 04:21:25 EDT
It's not just the hover. It's also in the Javadoc view.
Comment 11 Markus Keller CLA 2007-12-04 12:51:20 EST
(In reply to comment #7)
> I think calling setText makes the browser load the text asynchronious to the
> callee. Maybe delaying the call to setVisible by some milis makes things
> better?

I've implemented this for the Javadoc hovers (in org.eclipse.jface.internal.text.html.BrowserInformationControl 1.5).

We now call setText(..) and then wait for 100ms or until the progressListener gets a "completed" event (whichever happens first). This avoids flickering (tested on WinXP (IE), Linux-GTK (Mozilla), Mac OS X 10.4 (Safari)).
Comment 12 Eclipse Webmaster CLA 2019-09-06 16:10:36 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.