Bug 84938 - [RCP] Provide a way to set initial application window position
Summary: [RCP] Provide a way to set initial application window position
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, helpwanted
Depends on:
Blocks:
 
Reported: 2005-02-10 16:00 EST by Jeff Hardy CLA
Modified: 2016-09-26 04:12 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Hardy CLA 2005-02-10 16:00:03 EST
When an RCP application (or even the Eclipse IDE itself) is started for the 
first time, the window position is such that the app window extends past the 
screen's display area (if the app window's size is close to the size of the 
screen).  There seems to be no way to change the default starting location of 
the application window.

An implementation of IWorkbenchWindowConfigurer.setInitialPosition(...) would be 
great - it would allow an RCP application to set the default window position in 
the WorkbenchAdvisor.preWindowOpen(...) method, along with the default window 
size.
Comment 1 Kim Horne CLA 2005-02-11 10:36:21 EST
We should fix the initial window position even if we don't provide this
override.  I hadn't noticed it before myself, but now that you point it out I
cant imagine how I missed it.  Created Bug 85003 to track that defect.
Comment 2 Nick Edgar CLA 2005-02-11 18:10:46 EST
A workaround is to set the shell location in postWindowCreate.
Comment 3 Jeff Hardy CLA 2005-02-11 18:36:55 EST
This workaround does work - but too well.  This workaround makes the window 
_always_ appear at the coordinates given in postWindowCreate, even if the 
workbench state was loaded from a previous run of the app (without this 
workaround, the window location is restored from the previous run).

What I'd like is a way to provide a default window location for when there is no 
workbench state to restore.

In postWindowCreate I could check for the existence of a workbench.xml file to 
determine if I should set the shell's location, so this isn't a serious issue - 
but now I'm working around the workaround, so I still think a more proper way 
should be implemented.
Comment 4 Nick Edgar CLA 2005-02-11 18:48:21 EST
Set a flag in postWindowRestore using configurer.setData, and check it in
postWindowCreate.
Comment 5 Nick Edgar CLA 2005-03-30 13:07:13 EST
I'm going to have to defer this new API to post-3.1, unfortunately, but we will
address bug 85003.
Comment 6 Nick Edgar CLA 2006-03-15 11:24:26 EST
Reassigning bugs in component areas that are changing ownership.
Comment 7 Boris Bokowski CLA 2009-11-26 16:15:00 EST
Prakash is now responsible for watching bugs in the [RCP] component area.
Comment 8 Max Hohenegger CLA 2016-09-26 04:12:08 EDT
I noticed that I can set the initial location of my Trimmed Window via the Application.e4xmi, but not the size (I still have to use my ApplicationWorkbenchWindowAdvisor for that).
Does that invalidate this bug? Is there another bug for not being able to set the size?
I'm working on a RCP application, using the compatibility mode, with a Mars.2 target platform.