Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-24 Thread Denis Kozlov via Lazarus
I would advise strongly against the use of SwitchToThisWindow API function in Lazarus. Mainly because it states in the docs: /This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows./ Read more in Raymond Chen's blog - The life story

Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Alexey via Lazarus
On 23.05.2017 20:43, Ondrej Pokorny via Lazarus wrote: What are the equivalents for Qt, Qt5, Gtk2, Carbon, Cocoa? I meaned - to use in _inside_ LCLIntf.SetForegrondWindow, not making new LCL func. -- Regards, Alexey -- ___ Lazarus mailing list

Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Graeme Geldenhuys via Lazarus
On 2017-05-23 18:43, Ondrej Pokorny via Lazarus wrote: What are the equivalents for Qt, Qt5, Gtk2, Carbon, Cocoa? For anything running under X11 I have never had a problem with XRaiseWindow(xapplication.display, FWinHandle); So Qt and GTK could you that, if they aren't already. Regards,

Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Ondrej Pokorny via Lazarus
On 23.05.2017 19:38, Alexey via Lazarus wrote: What do you think about using this rare API [beginning from WinXP] in LCLIntf fnction? It will make LCL function work more stable: window will always go to foreground. I used it in CudaText. It works.

[Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-23 Thread Alexey via Lazarus
What do you think about using this rare API [beginning from WinXP] in LCLIntf fnction? It will make LCL function work more stable: window will always go to foreground. I used it in CudaText. It works. https://github.com/Alexey-T/CudaText/blob/master/app/fix_focus_window.pas -- Regards, Alexey