Bug 564073 - [MACOS] Also call update (); in Display#runDeferredLayouts similar to GTK
Summary: [MACOS] Also call update (); in Display#runDeferredLayouts similar to GTK
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.14   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 08:57 EDT by Lars Vogel CLA
Modified: 2020-06-16 13:01 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 Lars Vogel CLA 2020-06-08 08:57:59 EDT
GTK: 
boolean runDeferredLayouts () {
	if (layoutDeferredCount != 0) {
		Composite[] temp = layoutDeferred;
		int count = layoutDeferredCount;
		layoutDeferred = null;
		layoutDeferredCount = 0;
		for (int i = 0; i < count; i++) {
			Composite comp = temp[i];
			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
		}
		update ();
		return true;
	}
	return false;
}

MacOS:

boolean runDeferredLayouts () {
	if (layoutDeferredCount != 0) {
		Composite[] temp = layoutDeferred;
		int count = layoutDeferredCount;
		layoutDeferred = null;
		layoutDeferredCount = 0;
		for (int i = 0; i < count; i++) {
			Composite comp = temp[i];
			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
		}
		update ();
		return true;
	}
	return false;
}

This missing call my explain bugs like Bug 494470 in which layout behaves incorrect on Mac while it works well on GTK.
Comment 1 Lars Vogel CLA 2020-06-08 08:59:18 EDT
Sorry current Mac version of cause is missing the update() call:

MacOS:

boolean runDeferredLayouts () {
	if (layoutDeferredCount != 0) {
		Composite[] temp = layoutDeferred;
		int count = layoutDeferredCount;
		layoutDeferred = null;
		layoutDeferredCount = 0;
		for (int i = 0; i < count; i++) {
			Composite comp = temp[i];
			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
		}
		return true;
	}
	return false;
}
Comment 2 Eclipse Genie CLA 2020-06-08 08:59:35 EDT
New Gerrit change created: https://git.eclipse.org/r/164439
Comment 3 Lakshmi P Shanmugam CLA 2020-06-08 09:39:32 EDT
@Lars,
Can you please give an example of the problem that the change fixes?
Comment 4 Lakshmi P Shanmugam CLA 2020-06-08 09:41:07 EDT
(In reply to Lakshmi Shanmugam from comment #3)
> @Lars,
> Can you please give an example of the problem that the change fixes?

or a snippet so that I can test it.
Comment 5 Lars Vogel CLA 2020-06-08 10:45:05 EDT
(In reply to Lakshmi Shanmugam from comment #3)
> @Lars,
> Can you please give an example of the problem that the change fixes?

Only don't have a Mac so I don't know but test case would be Bug 494470
Comment 6 Lakshmi P Shanmugam CLA 2020-06-09 07:08:03 EDT
(In reply to Lars Vogel from comment #5)
> (In reply to Lakshmi Shanmugam from comment #3)
> > @Lars,
> > Can you please give an example of the problem that the change fixes?
> 
> Only don't have a Mac so I don't know but test case would be Bug 494470

Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=494470#c21, we need to verify if the bug is still reproducible.