[Lazarus] Patch: single button on taskbar (was: vote for single button IDE)

Flávio Etrusco flavio.etrusco at gmail.com
Mon Apr 19 15:05:50 CEST 2010


2010/4/19 Zaher Dirkey <parmaja at gmail.com>:
> Look at
> procedure TCustomForm.WMActivate(var Message : TLMActivate);
>
>   // The button reappears in some situations (e.g. when the window gets the
>   //"urgency" flag) so we hide it again here.
>   // This is the most important place to invoke UpdateShowInTaskBar, since
>   //invoking it anywhere else seeems basically useless/frequently reversed.
>   if (ShowInTaskBar = stNever) or ((ShowInTaskBar = stDefault)
>     and (Application.TaskBarBehavior = tbSingleButton)) then
>   begin
>     UpdateShowInTaskBar;
>   end;
>
> For non main form it hide and show every time the form is activated, when
> use "Application.TaskBarBehavior := tbSingleButton" in the project.
>
> I think the to resolve a problem in GTK2 "The button reappears in some
> situations"
>
> Thanks
> --
> Zaher Dirkey
>

Thanks for testing it, Zaher.
I guess we'll have to add a check for
"WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm)" in the
code above, since the comments in TWin32WSCustomForm.SetShowInTaskbar
suggest we can't eliminate the "hide" and I also see no WS-dependent
way to determine whether we could skip SetShowInTaskbar when the value
is already correct...

-Flávio




More information about the Lazarus mailing list