RCP app on dual screen PC [message #1269877] |
Wed, 12 March 2014 09:23 |
Bernard Sarter Messages: 88 Registered: August 2011 Location: Paris, France |
Member |
|
|
Hello,
I have a dual screen windows-7 PC, and need to start a RCP app (based on Kepler-SR1), that should automatically display perspective #1 in full screen on screen 1, and perspective #2 in full screen on screen 2.
My main screen is at x=-1920,y=0; the second screen is at x=0,y=0. Both are full HD.
I tried (with some variants)
public void postWindowOpen() {
if (Display.getCurrent().getBounds().width > 1920 && PlatformUI.getWorkbench().getWorkbenchWindowCount() == 1) {
PlatformUI.getWorkbench().openWorkbenchWindow(
"myPerspective2Id", null);
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
shell.setBounds(0, 0, 1920, 1080);
}
}
This opens a second window with the second perspective, but still on the first screen (ie, at x=-1920). I don't know how to force the second window to open on the second screen.
Any suggestion ?
Thanks,
Bernard.
|
|
|
Powered by
FUDForum. Page generated in 0.02877 seconds