<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, Feb 22, 2021 at 3:29 AM Andrey Sobol via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You excluded this code from lcore.pas<br>
<br>
procedure THelpForm.ShowApp();<br>
......<br>
{$IFDEF WINDOWS}<br>
     // Go to TOC TreeView and to get focus on foreground window<br>
     KeyInput.Apply([ssCtrl]);<br>
     KeyInput.Press(VK_T);<br>
     KeyInput.UnApply([ssCtrl]);<br>
{$ENDIF}<br></blockquote><div><br></div><div>Oh, LazMouseAndKeyInput was just for that code.</div><div>It created a serious bug. After pressing F1 in source editor the end of current word was cut off.</div><div>The reason was that VK_T went to Lazarus IDE, although LHelp sent it to itself, and the default command for VK_T is "Delete to end of word".</div><div>Didn't you notice the bug?</div><div>It was discussed in Lazarus devel mailing list. It should have happened here instead.</div><div><div>Something funny happens in the interprocess communication. How could key VK_T bring LHelp to front if it went to Lazarus' source editor?</div></div><div><div><br></div><div><div></div></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Without the code on windows system we can`t get rightly a focus  lHelp <br>
by an event of restore the window after hide (the window is blinking on <br>
an aplication panel sometimes). We should send an user input sentence to <br>
the foregroud window from a mouse or from keyboard to get focus (that is <br>
windows specific problem).<br></blockquote><div><br></div><div>Yes, in Windows terminology bringing to front means blinking an icon in Taskbar.</div><div>A Lazarus user however wants to see the help window right after pressing F1.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I see some solutions of that:<br>
1. To rewrite that code by WinApi (that is simple).<br>
2. To exclude the package dependency on Mac system, but I don`t know how?<br></blockquote><div><br></div><div>LazMouseAndKeyInput must be fixed for MacOS Cocoa but that is a whole different issue.<br></div><div>Now that problem involves only Windows. A cross-platform package is not needed for that.</div><div>The libXtst library dependency pulled in for Linux (and UNIX) was a 100% increase of system dependencies for a Lazarus release, and for absolutely no benefit.</div><div>Now Lazarus BigIde depends on just libgtk2.0-dev.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3. To fix the Application.BringToFront() function at windows to rightly <br>
bring a foreground window to a front of a display.<br></blockquote><div><br></div><div>That was my idea, too.</div><div>The method name BringToFront() is quite unambiguous. It should bring the application to front. :)<br></div><div>The name is not BlinkAnIconInTaskbar().</div><div>If you know how to fix it, please do. I don't use Windows much myself. Does this idea go against some Windows convention?<br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">But I don`t see that problem now :). May be the blinkg was also a part <br>
of that issue <a href="https://bugs.freepascal.org/view.php?id=38276" rel="noreferrer" target="_blank">https://bugs.freepascal.org/view.php?id=38276</a><br>
<br>
I redone many pieces after that, that a second round :)<br></blockquote><div><br></div><div>I removed the LazMouseAndKeyInput dependency in r64647.<br></div><div>Please fix the remaining issues as you see fit (without libXtst dependency for Linux).</div><div><br></div><div><br></div><div>Regards,</div><div>Juha</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>