[Lazarus] Patch win32callback

Paul Ishenin webpirat at mail.ru
Thu Jun 12 14:02:50 CEST 2008


JoshyFun wrote:
> Hello lazarus,
>
> I had attached a patch against current win32callback.inc file. This
> patch removes non needed SetWindowPos calls when no StayOnTop windows
> are present in the application. Currently when APPACTIVATE is being
> received to deactivate the window, all StayOnTop windows are converted
> to regular windows and then the next window (other application) if
> manually set to top of ZOrder.
>
> When the application is being activated StayOnTop flags are being
> restored and window application moved to top of ZOrder.
>   
Correct. Can you attach another patch in more usual format which 
tortoise svn or another svn tool do. I dont understand your format and 
my tools too.
> This shake in windows order finally becomes my WinXP a bit crazy and
> finally the windows opened after lazarus or your application start to
> bring to second position in ZOrder other windows, so an example, if
> you have windows 1, 2 and 3 in the stack and you activate the window
> 2, the new expected stack is 1,3,2 but you end up with 3,1,2.
>
> This patch removes mostly this problem but other calls to SetWindowPos
> in other places are bringing the same stack problems, but much later.
> Also the patch removes the strange effect when application is being
> deactivated clicking in another window, as visually you will see
> (specially in slow computers) the window deactivates, activate again
> and finally deactivates.
>
> I was unable to see any possible side effect of this patch as when
> StayOnTop windows are present behaviour changes to work as before the
> patch.
>   
This needs to be tested in application with StayOnTop forms.
> I wish to talk with the Win32 interface maintainer in order to find a
> way to remove or change the other SetWindowPos calls that affect
> ZOrder to completly prevent this behavior.
>   
This things needs to be rewriteen in more generic way since not only 
win32 but other widgetsets should do the same clearing/restoring 
stayontop on activate/deactivate.
> PS: Is the remove of StayOnTop flags expected ? StayOnTop flags in
> windows is desktop wide, so a deactivated application with StayOnTop
> should keep its StayOnTop windows on top, or maybe I'm wrong ?
>   
Yes, it is expected. 1) Who needs another application windows when he 
doesnot working with it? 2) This is delphi compatible 3) We have many 
complains when we did not do so in bug-tracker.

Best regards,
Paul Ishenin.



More information about the Lazarus mailing list