When a display is launched from the command line and opened as a 'New Window', i.e. phoebus -resource file:/xx/xxx/file.bob?target=window, it will always be positioned at the default x=50, y=50 location on the monitor.
However, when you open a display from an ActionButton in the 'New Window' mode, it reads the x and y defined in the BOB file and positions that display in that location:
|
double x = model.propX().getValue(); |
The same is also true of width & height. Opening from an ActionButton will open the window with dimensions based on the BOB display's width and height properties:
|
new_stage.setWidth(model.propWidth().getValue() + 18); |
, while launching from a terminal using the default 1600 x 900 dimensions.
These two behaviors seem inconsistent. While I know that you can manually specify the width, height, x and y from the command line, I was wondering whether the default behavior when launching a new window from the terminal should be to position the new window at the x and y defined in the model and resize the window accordingly?
This was also what used to be done by CS-Studio when you opened with Position=NEW_SHELL in the command line argument.
Any thoughts on whether this would be a reasonable thing to do? It would impact the existing behavior so we may need to use an 'opt in' preference.
When a display is launched from the command line and opened as a 'New Window', i.e.
phoebus -resource file:/xx/xxx/file.bob?target=window, it will always be positioned at the default x=50, y=50 location on the monitor.However, when you open a display from an ActionButton in the 'New Window' mode, it reads the x and y defined in the BOB file and positions that display in that location:
phoebus/app/display/runtime/src/main/java/org/csstudio/display/builder/runtime/app/DockItemRepresentation.java
Line 65 in 31059ed
The same is also true of width & height. Opening from an ActionButton will open the window with dimensions based on the BOB display's width and height properties:
phoebus/app/display/runtime/src/main/java/org/csstudio/display/builder/runtime/app/DockItemRepresentation.java
Line 86 in 31059ed
, while launching from a terminal using the default 1600 x 900 dimensions.
These two behaviors seem inconsistent. While I know that you can manually specify the width, height, x and y from the command line, I was wondering whether the default behavior when launching a new window from the terminal should be to position the new window at the x and y defined in the model and resize the window accordingly?
This was also what used to be done by CS-Studio when you opened with
Position=NEW_SHELLin the command line argument.Any thoughts on whether this would be a reasonable thing to do? It would impact the existing behavior so we may need to use an 'opt in' preference.