There seems to be problems on some system where the main shell is not in
focus initially. This was seen using Xvfb and Xephyr on some occasions.
Change-Id: Ib6dda93e856deb96cf865dce6253b48c99171184
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/62979
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
SWTWorkbenchBot bot = new SWTWorkbenchBot();
UIThreadRunnable.syncExec(() -> {
+
+ // There seems to be problems on some system where the main shell is
+ // not in focus initially. This was seen using Xvfb and Xephyr on some occasions.
+ focusMainWindow(bot.shells());
+
Shell shell = bot.activeShell().widget;
// Only adjust shell if it appears to be the top-most