On Mon, Feb 22, 2021 at 3:29 AM Andrey Sobol via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> You excluded this code from lcore.pas
>
> procedure THelpForm.ShowApp();
> ......
> {$IFDEF WINDOWS}
>      // Go to TOC TreeView and to get focus on foreground window
>      KeyInput.Apply([ssCtrl]);
>      KeyInput.Press(VK_T);
>      KeyInput.UnApply([ssCtrl]);
> {$ENDIF}
>

Oh, LazMouseAndKeyInput was just for that code.
It created a serious bug. After pressing F1 in source editor the end of
current word was cut off.
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".
Didn't you notice the bug?
It was discussed in Lazarus devel mailing list. It should have happened
here instead.
Something funny happens in the interprocess communication. How could key
VK_T bring LHelp to front if it went to Lazarus' source editor?



> Without the code on windows system we can`t get rightly a focus  lHelp
> by an event of restore the window after hide (the window is blinking on
> an aplication panel sometimes). We should send an user input sentence to
> the foregroud window from a mouse or from keyboard to get focus (that is
> windows specific problem).
>

Yes, in Windows terminology bringing to front means blinking an icon in
Taskbar.
A Lazarus user however wants to see the help window right after pressing F1.


I see some solutions of that:
> 1. To rewrite that code by WinApi (that is simple).
> 2. To exclude the package dependency on Mac system, but I don`t know how?
>

LazMouseAndKeyInput must be fixed for MacOS Cocoa but that is a whole
different issue.
Now that problem involves only Windows. A cross-platform package is not
needed for that.
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.
Now Lazarus BigIde depends on just libgtk2.0-dev.


3. To fix the Application.BringToFront() function at windows to rightly
> bring a foreground window to a front of a display.
>

That was my idea, too.
The method name BringToFront() is quite unambiguous. It should bring the
application to front. :)
The name is not BlinkAnIconInTaskbar().
If you know how to fix it, please do. I don't use Windows much myself. Does
this idea go against some Windows convention?


But I don`t see that problem now :). May be the blinkg was also a part
> of that issue https://bugs.freepascal.org/view.php?id=38276
>
> I redone many pieces after that, that a second round :)
>

I removed the LazMouseAndKeyInput dependency in r64647.
Please fix the remaining issues as you see fit (without libXtst dependency
for Linux).


Regards,
Juha
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to