View Issue Details

IDProjectCategoryView StatusLast Update
0019272LazarusOtherpublic2021-05-01 19:19
ReporterAndrey Zubarev Assigned ToMichl  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version2.1 (SVN) 
Summary0019272: AchorDocking ignored FormStyle:=fsStayOnTop
Descriptionusing AchorDocking ignored TForm.FormStyle:=fsStayOnTop, because of which it is impossible to use a window is not docked, it falls under the main form.
Tagsdocking
Fixed in Revision65034, 65044, 65046, 65051, 65061, 65062
LazTarget-
Widgetset
Attached Files

Relationships

related to 0018298 resolvedMattias Gaertner Please update the default layout provided with anchor docking package 
has duplicate 0038779 closedMichl Additional windows are hidden by main IDE window with AnchorDockingDsgn 
related to 0038271 resolvedMichl Field Editor Window is not dockable, it gets hidden if the IDE compiled with anchordocking 
related to 0038790 resolvedMichl FormStyle fsNormal is ignored after switching back from fsStayOnTop 
related to 0038835 resolvedMichl Anchordocking should fsSplash forms untouched. 

Activities

Mattias Gaertner

2018-05-21 09:50

manager   ~0108464

I'm not sure how you expect fsStayOnTop and docking to work together.

Please provide an example.

Andrey Zubarev

2018-05-21 20:02

reporter   ~0108470

let it be something else, should be able to not give undocked window falls under the main form. otherwise, the undocked windows will quickly be lost.

Unfortunately I can't give an example

Mattias Gaertner

2018-05-21 20:19

manager   ~0108472

What do you mean with "undocked window"?

At the moment I have no clue what setup you are talking about.

Ondrej Pokorny

2018-05-22 09:20

developer   ~0108475

Just a note: when AnchorDocking is installed and enabled it would be more appropriate to set

  Application.MainFormOnTaskBar := True;

-> in this case all floating windows are above the main window even without fsStayOnTop.

Andrey Zubarev

2018-05-22 10:43

reporter   ~0108476

See animated gif https://imgur.com/a/6LZMsjp
Object inspector - "undocked window", Project tree form with fsStayOnTop
I need make project tree dockable, but I'm afraid of problems with falling under main form - it is often used undocked

Andrey Zubarev

2018-05-22 10:49

reporter   ~0108477

@Ondrej Pokorny
Yes, it works. how is it? It's like some kind of accident... or it by design?

Ondrej Pokorny

2018-05-22 11:32

developer   ~0108478

> Yes, it works. how is it? It's like some kind of accident... or it by design?

It is by design (on Windows).

Andrey Zubarev

2018-05-22 11:40

reporter   ~0108479

>>(on Windows)
it works in other wigesets?

Michl

2021-04-20 23:12

developer   ~0130487

I made some changes in Trunk revision 65034. If a Form has FormStyle fsStayOnTop or fsSystemStayOnTop, the AnchorDockHostSite behaves the same. I also added the option FloatingWindowsOnTop. If you check that option, all not docked windows are on top now, at least on Win and GTK2. QT5 fails.

Downside of that option, the undocked windows becomes the FormStyle fsStayOnTop. For now I don't buffer the original FormStyle. Even if it would set to default e.g. fsNormal, there seems to be a bug in LCL, at least on Windows, the window stays further on top. So you have to restart your application for normal behaviour.

Can you please test, if it is ok and report possible issues.

Thank you

Andrey Zubarev

2021-04-21 00:13

reporter   ~0130489

I test on win32, there are a few comments
1) FloatingWindowsOnTop not saved\loaded
2) Check attached layout for minide example. If I load this and set FloatingWindowsOnTop, only ObjectInspector stay top

Andrey Zubarev

2021-04-21 00:14

reporter   ~0130490

bug19272.xml (2,350 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<CONFIG>
  <MainConfig>
    <Nodes ChildCount="4">
      <Item1 Name="MainIDE" Type="CustomSite" ChildCount="1">
        <Bounds Top="50" Left="100" Width="600" Height="484">
          <WorkArea>
            <Rect Right="2560" Bottom="1440"/>
          </WorkArea>
        </Bounds>
        <Item1 Name="SourceEditor1" Type="Control">
          <Bounds Top="64" Width="600" Height="400" SplitterPos="59"/>
          <Anchors Align="Bottom"/>
        </Item1>
      </Item1>
      <Item2 Name="AnchorDockSite2" Type="Layout" ChildCount="3">
        <Bounds Top="355" Left="259" Width="247" Height="204">
          <WorkArea>
            <Rect Right="2560" Bottom="1440"/>
          </WorkArea>
        </Bounds>
        <Item1 Name="Messages" Type="Control">
          <Bounds Width="247" Height="100"/>
          <Anchors Bottom="AnchorDockSplitter2"/>
        </Item1>
        <Item2 Name="AnchorDockSplitter2" Type="SplitterHorizontal">
          <Bounds Top="100" Width="247" Height="4"/>
        </Item2>
        <Item3 Name="FPDocEditor" Type="Control">
          <Bounds Top="104" Width="247" Height="100"/>
          <Anchors Top="AnchorDockSplitter2"/>
        </Item3>
      </Item2>
      <Item3 Name="ObjectInspector" Type="Control">
        <Bounds Top="235" Left="137" Width="194" Height="350">
          <WorkArea>
            <Rect Right="2560" Bottom="1440"/>
          </WorkArea>
        </Bounds>
      </Item3>
      <Item4 Name="AnchorDockSite6" Type="Pages" ChildCount="3">
        <Bounds Top="223" Left="377" Width="350" Height="350">
          <WorkArea>
            <Rect Right="2560" Bottom="1440"/>
          </WorkArea>
        </Bounds>
        <Header PageIndex="2"/>
        <Item1 Name="SourceEditor2" Type="Control">
          <Bounds Width="320" Height="240"/>
          <Anchors Align="Client"/>
        </Item1>
        <Item2 Name="ProjectInspector" Type="Control">
          <Bounds Width="329" Height="322"/>
          <Anchors Align="Client"/>
        </Item2>
        <Item3 Name="CodeExplorer" Type="Control">
          <Bounds Width="329" Height="322"/>
          <Anchors Align="Client"/>
        </Item3>
      </Item4>
    </Nodes>
  </MainConfig>
  <Settings FloatingWindowsOnTop="True"/>
</CONFIG>
bug19272.xml (2,350 bytes)   

Michl

2021-04-21 22:58

developer   ~0130504

Thank you for testing and reporting! This two issues should be fixed in revision 65044 and 65046.

I now added a private list, where the original form styles are saved and reseted back after option FloatingWindowsOnTop is deactivated. Just tested Windows, there is a bug as mentioned above and doesn't work. Maybe it can be fixed on LCL side.

Can you please test again?

Andrey Zubarev

2021-04-21 23:40

reporter   ~0130505

Please test with minidewithdockpanel.
I create layout, set FloatingWindowsOnTop, works good. Save layout as layout.xml (this file loaded at startup minidewithdockpanel). Restart test - FloatingWindowsOnTop is set, but not work((
layout.xml (1,303 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<CONFIG>
  <MainConfig>
    <Nodes ChildCount="2">
      <Item1 Name="AnchorDockPanel1" Type="CustomSite" ChildCount="1">
        <Bounds Top="43" Left="45" Width="568" Height="418"/>
        <Anchors Align="Client"/>
        <Item1 Name="AnchorDockSite3" Type="Layout" ChildCount="3">
          <Bounds Top="1" Left="1" Width="528" Height="337"/>
          <Anchors Align="Client"/>
          <Item1 Name="SourceEditor1" Type="Control">
            <Bounds Width="528" Height="171"/>
            <Anchors Bottom="AnchorDockSplitter1"/>
          </Item1>
          <Item2 Name="AnchorDockSplitter1" Type="SplitterHorizontal">
            <Bounds Top="171" Width="528" Height="4"/>
          </Item2>
          <Item3 Name="DebugOutput" Type="Control">
            <Bounds Top="175" Width="528" Height="162"/>
            <Anchors Top="AnchorDockSplitter1"/>
          </Item3>
        </Item1>
      </Item1>
      <Item2 Name="ProjectInspector" Type="Control">
        <Bounds Top="154" Left="386" Width="326" Height="250">
          <WorkArea>
            <Rect Right="2560" Bottom="1440"/>
          </WorkArea>
        </Bounds>
      </Item2>
    </Nodes>
  </MainConfig>
  <Settings FloatingWindowsOnTop="True"/>
</CONFIG>
layout.xml (1,303 bytes)   

Michl

2021-04-22 20:51

developer   ~0130526

Thank you again for testing and reporting.

I fixed this issue in revision 65051. Can you test again?

Michl

2021-04-22 23:34

developer   ~0130531

> Even if it would set to default e.g. fsNormal, there seems to be a bug in LCL, at least on Windows, the window stays further on top.

Fixed in revision 65053

Andrey Zubarev

2021-04-22 23:54

reporter   ~0130532

The problem remains in my complex application, but I can't reproduce it in simple examples yet. Maybe a problem on my part, it takes time

Michl

2021-04-23 08:06

developer   ~0130535

Last edited: 2021-04-23 20:17

View 2 revisions

Are you using a splash screen or a other initial showing of a form? If yes, this could be the culprit. I tested it and it works here, but maybe you do it in a other way.

Also a problem would be, if your MainForm has FormStyle fsStayOnTop or your docked window is not Application.MainForm.

Andrey Zubarev

2021-04-24 05:50

reporter   ~0130558

Yes, it use splash. If I remove splash, problem remains.
Application.MainForm=fsNormal

There may still be some reasons?

Andrey Zubarev

2021-04-24 19:33

reporter   ~0130562

Problem in anchordocking.pas line2803
if not Assigned(AMainForm) then AMainForm := Screen.Forms[0];

my MainForm is Screen.Forms[1]
Despite the fact that I removed the splashscreen, something is created somewhere before the main form. Can we add a mechanism to force the main form to be specified?

Anton Kavalenka

2021-04-24 19:53

reporter   ~0130563

there is Application.MainForm

Andrey Zubarev

2021-04-24 20:04

reporter   ~0130564

in this moment Application.MainForm=nil so far

Michl

2021-04-24 22:43

developer   ~0130567

> Can we add a mechanism to force the main form to be specified?

In revision 65061 I added the property DockMaster.MainDockForm. You can set it and all other windows should be floating windows with FormStyle fsStayOnTop.

All my testing cases here are working. Can you test too?

Andrey Zubarev

2021-04-24 23:22

reporter   ~0130568

Yes, it work! Thanks!

Andrey Zubarev

2021-04-24 23:28

reporter   ~0130570

Need to enable this option by default in Lazarus Docked IDE

Michl

2021-04-25 18:04

developer   ~0130575

> Need to enable this option by default in Lazarus Docked IDE.

I enabled it for a new created Lazarus in revision 65062. It only works, when config is empty/fresh, otherwise config from environmentoptions.xml is loaded.

So I think, this issue can be marked as resolved.

Issue History

Date Modified Username Field Change
2011-05-01 09:24 Andrey Zubarev New Issue
2011-05-01 09:25 Andrey Zubarev Tag Attached: docking
2011-05-01 11:27 Mattias Gaertner Status new => assigned
2011-05-01 11:27 Mattias Gaertner Assigned To => Mattias Gaertner
2014-10-18 12:59 Mattias Gaertner Relationship added related to 0018298
2018-05-21 09:50 Mattias Gaertner LazTarget => -
2018-05-21 09:50 Mattias Gaertner Note Added: 0108464
2018-05-21 09:50 Mattias Gaertner Status assigned => feedback
2018-05-21 20:02 Andrey Zubarev Note Added: 0108470
2018-05-21 20:02 Andrey Zubarev Status feedback => assigned
2018-05-21 20:19 Mattias Gaertner Note Added: 0108472
2018-05-22 09:20 Ondrej Pokorny Note Added: 0108475
2018-05-22 10:43 Andrey Zubarev Note Added: 0108476
2018-05-22 10:49 Andrey Zubarev Note Added: 0108477
2018-05-22 11:32 Ondrej Pokorny Note Added: 0108478
2018-05-22 11:40 Andrey Zubarev Note Added: 0108479
2021-04-20 18:29 Michl Relationship added related to 0038779
2021-04-20 18:29 Michl Assigned To Mattias Gaertner => Michl
2021-04-20 22:45 Michl Relationship replaced has duplicate 0038779
2021-04-20 22:46 Michl Relationship added related to 0038271
2021-04-20 23:12 Michl Status assigned => feedback
2021-04-20 23:12 Michl Note Added: 0130487
2021-04-21 00:13 Andrey Zubarev Note Added: 0130489
2021-04-21 00:13 Andrey Zubarev Status feedback => assigned
2021-04-21 00:14 Andrey Zubarev Note Added: 0130490
2021-04-21 00:14 Andrey Zubarev File Added: bug19272.xml
2021-04-21 22:52 Michl Fixed in Revision => 65034, 65044, 65046
2021-04-21 22:58 Michl Status assigned => feedback
2021-04-21 22:58 Michl Note Added: 0130504
2021-04-21 23:40 Andrey Zubarev Note Added: 0130505
2021-04-21 23:40 Andrey Zubarev File Added: layout.xml
2021-04-21 23:40 Andrey Zubarev Status feedback => assigned
2021-04-22 20:51 Michl Status assigned => feedback
2021-04-22 20:51 Michl Note Added: 0130526
2021-04-22 20:51 Michl Fixed in Revision 65034, 65044, 65046 => 65034, 65044, 65046, 65051
2021-04-22 23:32 Michl Relationship added related to 0038790
2021-04-22 23:34 Michl Note Added: 0130531
2021-04-22 23:54 Andrey Zubarev Note Added: 0130532
2021-04-22 23:54 Andrey Zubarev Status feedback => assigned
2021-04-23 08:07 Michl Note Added: 0130535
2021-04-23 20:17 Michl Note Edited: 0130535 View Revisions
2021-04-24 05:50 Andrey Zubarev Note Added: 0130558
2021-04-24 19:33 Andrey Zubarev Note Added: 0130562
2021-04-24 19:53 Anton Kavalenka Note Added: 0130563
2021-04-24 20:04 Andrey Zubarev Note Added: 0130564
2021-04-24 22:43 Michl Status assigned => feedback
2021-04-24 22:43 Michl Note Added: 0130567
2021-04-24 23:22 Andrey Zubarev Note Added: 0130568
2021-04-24 23:22 Andrey Zubarev Status feedback => assigned
2021-04-24 23:28 Andrey Zubarev Note Added: 0130570
2021-04-25 17:59 Michl Fixed in Revision 65034, 65044, 65046, 65051 => 65034, 65044, 65046, 65051, 65061, 65062
2021-04-25 18:04 Michl Status assigned => resolved
2021-04-25 18:04 Michl Resolution open => fixed
2021-04-25 18:04 Michl Fixed in Version => 2.1 (SVN)
2021-04-25 18:04 Michl Note Added: 0130575
2021-04-25 19:35 Andrey Zubarev Status resolved => closed
2021-05-01 19:19 Michl Relationship added related to 0038835