View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0023839||Packages||Other||public||2013-02-06 03:55||2016-01-01 11:35|
|Reporter||Thaddy de Koning||Assigned To||Ondrej Pokorny|
|Product Version||1.0.7 (SVN)|
|Summary||0023839: Multi-monitor issue with project restore|
|Description||There is an issue that when you close a project in a multi-monitor setup. Disconnect one (or more) monitors, there is no fall-back when opening the project again on a single monitor. This can really screw you when working on the train ;) It would be nice if the IDE could detect that the saved settings are bollocks and revert to a default fall-back. Perhaps with a dialog if you want to preserve the original settings for later.|
Currently it borders on a bug, because some parts of the IDE almost completely disappear. And opposite, back to the normal multi-monitor set-up the whole IDE looks tiny and all wrong. It is pretty trivial for the IDE to detect this different use and can keep track of the current monitor configuration.
|Steps To Reproduce||Save project. Disconnect second monitor. Load project. |
|Tags||No tags attached.|
|Fixed in Revision|
|related to||0026140||resolved||Ondrej Pokorny||Lazarus||Source editor window jumps to top of screen when any tab clicked|
|related to||0026051||closed||Martin Friebe||Lazarus||Moves the code window after changing the active tab|
|related to||0027290||resolved||Ondrej Pokorny||Lazarus||Store IDE position|
|related to||0025540||resolved||Ondrej Pokorny||Lazarus||Windows won't keep position on second monitor|
A suggested work-around is to provide a shortcut to restore a default screen layout (without saving it?).
I guess I am not the only one who experienced this bug.
Well the workaround is in the Menu "Window" > "Center a lost Window"
Please do not "knock", we got over 1000 other unhanded issues, and if they all get knocks, well...
If you whish to speed it up by helping, best is to ask on the mail list, which code you can look at, to try find a solution.
>>> " some parts of the IDE almost completely disappear "
Can you specify which parts (please test with 1.2 / and if possible also with 1.3, since there have been changes)
Most Windows use the function described below, and I would expect them to be ok, if the IDE can detect your screen count and size at all.
Btw, the issue is more complex than sound at first.
I added 2 related issues. At first sight they are the opposite. But the use the same function "TIDEWindowCreatorList.ShowForm"
In 1.2, this function tries to force everything on Screen, even against the users explicit whish.
As for helping.
For the forms, that fail, check if they use "TIDEWindowCreatorList.ShowForm".
** IF they do:
Check that Screen Count and Sizes are correct.
Write a small app of your own, access the global variable "Screen: TScreen " returns correct Count for monitors and desktops, and they all have correct coordinates.
Look at TCustomForm.MakeFullyVisible
Write a test, (or add debugln, andwatch when using the IDE.
Does GetWindowRect(Handle, ABounds) work?
How about Screen.MonitorFromWindow(Form.Handle, mdNearest) ?
I look at the code and lazarus IDE save custom positions only as left,right,width,height without information about monitors.
So if config have bounds (as example. left=-1600,...) and one monitor will be disconnected then IDE use
ValidateAndSetCoordinates function only for correct window position to be visible (at least +60 at left, etc.), but this correction is used for IDE winodws, not for project forms.
The best way is to save in configs information about monitors/resolutions and use it for restor as original on new monitor.
As example, if left was -1600 and screen width was 1600 then new left will be 0 if monitors was changed and is out at any side of screen.
With out information about last monitor resolution (when CustomPositions was saved) it can't be done.
So this is only/mainly about designer forms then. (Maybe update the title)
I will need to leave that to someone better acquainted with them than I am.
From my limited knowledge:
Currently all info about forms is stored in the LFM. Modifying the on screen pos also affects what will be compiled into the exe (even, if the exe may use something like DeskTopCenter instead of the hardcoded pos).
The problem goes further, if you adjust the top/left, then you could argue that heigh/width must also be adjusted if you are on a smaller screen. But that would be a substantial change to the project, that should not be done like that.
The best solution really would be to use an embedded designer (as will be needed for docking anyway). Then designer form are no longer displaying the position.
The 2nd best would be to allow the form/designer at a position different from top/left, and not to update top/left. Those would then need to be stored in the project-session instead.
Ultimately allowing switch-able layouts.
But even today you can start the IDE and substitute the lps file before according to your needs.
Or store lps in primary-conf-path, and start the IDE with pcp according to current screen setup
Should be fixed with the Desktops feature. You can create one Desktop for single monitor environment and one for double monitors.
You also can install the docked designer package from sparta if you have trouble with form designers on different monitors.
|2013-02-06 03:55||Thaddy de Koning||New Issue|
|2014-01-15 21:45||Juha Manninen||Relationship added||related to 0025540|
|2014-05-12 12:14||Thaddy de Koning||Note Added: 0074940|
|2014-05-12 14:33||Martin Friebe||Relationship added||related to 0026140|
|2014-05-12 14:34||Martin Friebe||Relationship added||related to 0026051|
|2014-05-12 14:47||Martin Friebe||Note Added: 0074944|
|2014-05-14 12:27||Tomasz Wieckowski||Note Added: 0074973|
|2014-05-14 14:36||Martin Friebe||Note Added: 0074982|
|2015-11-26 19:05||Ondrej Pokorny||LazTarget||=> -|
|2015-11-26 19:05||Ondrej Pokorny||Note Added: 0087615|
|2015-11-26 19:05||Ondrej Pokorny||Status||new => resolved|
|2015-11-26 19:05||Ondrej Pokorny||Resolution||open => fixed|
|2015-11-26 19:05||Ondrej Pokorny||Assigned To||=> Ondrej Pokorny|
|2016-01-01 11:35||Juha Manninen||Relationship added||related to 0027290|