<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/09/2015 16:16, Ondrej Pokorny
wrote:<br>
</div>
<blockquote cite="mid:55F04D51.1030606@kluug.net" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 09.09.2015 12:58, Juha Manninen
wrote:<br>
</div>
<blockquote
cite="mid:CAPN1EhC1sKPGGyWaT=2mcUr+5vXGhDttc0ykRXy+_n+xWroxcg@mail.gmail.com"
type="cite">
<pre wrap="">Martin Friebe noticed a problem with desktops and multiple source
editor windows.
In fact I also noticed that a second source editor is not restored
correctly when changing desktops.
Now I realized the 2nd, 3rd etc. editor windows are project specific,
while other layout settings are global. This is not very logical. How
to solve it?
I think all layout settings should be global for the sake of consistency.
Juha
</pre>
</blockquote>
<br>
The settings are saved correctly in the environment settings. Try
to save a desktop with 2 editor windows, move something (including
the editor windows) and then load the desktop. Both editor windows
are positioned correctly.<br>
</blockquote>
<br>
I have 2 source editors open. Always. In all projects, since
forever.<br>
<br>
Now I updated the ide, while 2 SrcEd are open, I checked that the
desktop settings were:<br>
- one layout named "default" (set as default)<br>
- autosave desktop.<br>
<br>
Both SE are open<br>
I have 2 monitors, both are on the left, with negative x-coordinate<br>
<br>
After an IDE restart, I find this in environmentopts.<br>
<br>
<Desktops Count="1" ActiveDesktop="default"><br>
<Desktop1 Name="default"><br>
...<br>
<SourceNotebook2><br>
<Caption Value="SourceNotebook2"/><br>
<WindowPlacement Value="RestoreWindowGeometry"/><br>
<CustomPosition Left="-879" Width="862" Height="996"/><br>
<WindowState Value="Normal"/><br>
</SourceNotebook2><br>
<SourceNotebook><br>
<Caption Value="SourceNotebook"/><br>
<WindowPlacement Value="RestoreWindowGeometry"/><br>
<CustomPosition Left="-1680" Width="823"
Height="991"/><br>
<WindowState Value="Normal"/><br>
</SourceNotebook><br>
<br>
Those values are ok. Sometimes the order is SourceNotebook2 first<br>
<br>
So I debug it. <br>
The first sourcenotebook is created in
TIDEWindowCreatorList.RestoreSimpleLayout;<br>
#0 RESTORESIMPLELAYOUT(0x11a7f988) at idewindowintf.pas:2248<br>
#1 RESTOREDESKTOP(0x156848) at environmentopts.pp:2109<br>
#2 RESTOREIDEWINDOWS(0x11a50548) at main.pp:2336<br>
#3 STARTIDE(0x11a50548) at main.pp:1548<br>
#4 main at lazarus.pp:127<br>
<br>
But the 2nd is NOT !<br>
<br>
It is created later (when it is actually needed):<br>
#0 CREATE(0x15b023c0, 0x1, 0x12b3c1b0, 1) at sourceeditor.pp:5733<br>
#1 CREATENEWWINDOW(0x12b3c1b0, false, false, 1) at
sourceeditor.pp:10554<br>
#2 SOURCEWINDOWWITHID(0x12b3c1b0, 1) at sourceeditor.pp:9403<br>
#3 OPENFILEINSOURCEEDITOR(0x1383a078, 0x154d5d20) at
sourcefilemanager.pas:410<br>
#4 OPENEDITORFILE(0x1383a078, -1, 1, 0x154d5d20,
[OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN]) at
sourcefilemanager.pas:1173<br>
#5 OPENEDITORFILE(0x154c6528
'B:\lazarus_latest\ide\sourcefilemanager.pas', -1, 1, 0x154d5d20,
[OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN], true) at
sourcefilemanager.pas:338<br>
#6 INITOPENEDPROJECTFILE(0x147c1e48, 0x15244d60
'B:\lazarus_latest\ide\lazarus.lpi', []) at
sourcefilemanager.pas:3424<br>
#7 DOOPENPROJECTFILE(0x11a50548, 0x15244d60
'B:\lazarus_latest\ide\lazarus.lpi', []) at main.pp:6022<br>
#8 SETUPSTARTPROJECT(0x11a50548) at main.pp:2219<br>
#9 STARTIDE(0x11a50548) at main.pp:1553<br>
#10 main at lazarus.pp:127<br>
<br>
And so the desktop is not applied.<br>
<br>
------------------------<br>
Opening the second SE-win in RestoreSimpleLayout wil only partly fix
issues.<br>
<br>
Because a desktop may have positions for 10 SE-win.<br>
A project may load with just one or two open at start. <br>
But then more get open while working on the project (I often open a
3rd or 4th temporarily). When they get opened they need to be placed
according to the active desktop.<br>
<br>
<br>
</body>
</html>