Bug 125702 - Collapsing tree leaves dead whitespace
Summary: Collapsing tree leaves dead whitespace
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks: 129779
  Show dependency tree
 
Reported: 2006-01-30 10:18 EST by Douglas Pollock CLA
Modified: 2006-05-02 17:02 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot of the weird package explorer state (9.60 KB, image/png)
2006-01-30 10:19 EST, Douglas Pollock CLA
no flags Details
screenshot (221.67 KB, image/png)
2006-04-24 14:53 EDT, Felipe Heidrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2006-01-30 10:18:10 EST
N20060130-0010 (and earlier), GTK+ 2.8.8, KDE 3.4.3, X.org 6.8.2

I'll attach a screenshot.  When I select collapse all in the Package Explorer, there is a big chunk of empty white space at the bottom.  I apologize if I've mis-filed this bug.
Comment 1 Douglas Pollock CLA 2006-01-30 10:19:10 EST
Created attachment 33786 [details]
Screenshot of the weird package explorer state
Comment 2 Tod Creasey CLA 2006-03-22 07:38:12 EST
Note that we are seeing similar problems in the problems view using a tree with columns
Comment 3 Michael Van Meekeren CLA 2006-04-05 17:00:18 EDT
this item is on the polish list for 3.2, will it be fixed for 3.2?
Comment 4 Veronika Irvine CLA 2006-04-05 17:14:45 EDT
That is my hope.
Comment 5 Veronika Irvine CLA 2006-04-10 15:25:03 EDT
I can't recreate this problem.  Are there specific steps?
Comment 6 Steve Northover CLA 2006-04-20 12:04:57 EDT
We need someone to help us recreate the problem.  Otherwise, we should take this bug off the polish list.  Tod, can you help us?
Comment 7 Felipe Heidrich CLA 2006-04-24 14:52:18 EDT
I think I can recreate this on GTK 2.8.10.
When Tree items are collased or destroyed the tree doesn't 'clain bottom free space' nor reset the scrollbar.
For me it looks worse in the outline view.
1. Open a class (a large one if possible, i used Tree.java)
2. Scroll to the middle in the outline view
3. check the button: hide non-public methods.
=> the view becomes empty, the scrollbar is wrong too.
I'll attach the screenshot.
Comment 8 Felipe Heidrich CLA 2006-04-24 14:53:33 EDT
Created attachment 39337 [details]
screenshot
Comment 9 Felipe Heidrich CLA 2006-04-24 15:28:26 EDT
snippet:

Run it, scroll the tree till the end, press F2
fails on GTK 2.8.10, works on 2.4.4

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

	final Tree tree = new Tree(shell, SWT.BORDER);
	for (int i = 0; i < 200; i++) {
		TreeItem item = new TreeItem(tree, SWT.NONE);
		item.setText("Item " + i);
	}
	display.addFilter(SWT.KeyDown, new Listener() {
		public void handleEvent(Event event) {
			if (event.keyCode == SWT.F2) {
				TreeItem[] items = tree.getItems();
				for (int i = 0; i < items.length; i += 2) {
					items[i].dispose();
				}
			}
		}
	});

	shell.setBounds(200, 200, 300, 300);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
Comment 10 Felipe Heidrich CLA 2006-04-25 18:26:08 EDT
Bug in GTK, it is fixed in GTK 2.8.14, see:
http://bugzilla.gnome.org/show_bug.cgi?id=316689

I tried to workaround this problem, but it happens deep down in the gtk internals.

Comment 11 Felipe Heidrich CLA 2006-05-02 11:50:53 EDT
This works fine in Fedora Core 5.
Comment 12 Steve Northover CLA 2006-05-02 13:48:51 EDT
Tod, I asked you a question (comment #2) but forgot to check whether you were actually on this bug report.  We think this is a WONTFIX.  Do you agree?
Comment 13 Tod Creasey CLA 2006-05-02 14:40:10 EDT
If it is a GTK issue then I don't see that we should work around it this late in the game so I agree.
Comment 14 Felipe Heidrich CLA 2006-05-02 17:02:23 EDT
closing