|
Lines 72-82
Link Here
|
| 72 |
} |
72 |
} |
| 73 |
}; |
73 |
}; |
| 74 |
|
74 |
|
| 75 |
// Counts how many times we've scheduled a redraw... use this to avoid resizing |
|
|
| 76 |
// the widgetry when we're getting resize requests faster than we can process them. |
| 77 |
// This is needed for GTK, which resizes slowly (bug 54517) |
| 78 |
private int redrawCounter = 0; |
| 79 |
|
| 80 |
private DefaultStackPresentationSite site = new DefaultStackPresentationSite() { |
75 |
private DefaultStackPresentationSite site = new DefaultStackPresentationSite() { |
| 81 |
/* (non-Javadoc) |
76 |
/* (non-Javadoc) |
| 82 |
* @see org.eclipse.ui.internal.skins.IPresentationSite#setState(int) |
77 |
* @see org.eclipse.ui.internal.skins.IPresentationSite#setState(int) |
|
Lines 278-298
Link Here
|
| 278 |
// to return quickly (without resizing). This way, if we recieve a lot of |
273 |
// to return quickly (without resizing). This way, if we recieve a lot of |
| 279 |
// resize requests in a row, we only need to process the last one. |
274 |
// resize requests in a row, we only need to process the last one. |
| 280 |
// This is needed for GTK, which resizes slowly (bug 54517) |
275 |
// This is needed for GTK, which resizes slowly (bug 54517) |
| 281 |
redrawCounter++; |
276 |
StackPresentation presentation = getPresentation(); |
| 282 |
getPresentation().getControl().getDisplay().asyncExec(new Runnable() { |
277 |
if (presentation == null || presentation.getControl().isDisposed()) { |
| 283 |
public void run() { |
278 |
return; |
| 284 |
--redrawCounter; |
279 |
} |
| 285 |
StackPresentation presentation = getPresentation(); |
280 |
getPresentation().setBounds(getBounds()); |
| 286 |
if (presentation == null || presentation.getControl().isDisposed()) { |
281 |
updateFastViewSashBounds(); |
| 287 |
return; |
|
|
| 288 |
} |
| 289 |
if (redrawCounter == 0) { |
| 290 |
getPresentation().setBounds(getBounds()); |
| 291 |
|
| 292 |
updateFastViewSashBounds(); |
| 293 |
} |
| 294 |
} |
| 295 |
}); |
| 296 |
} |
282 |
} |
| 297 |
|
283 |
|
| 298 |
/** |
284 |
/** |