Recent

Author Topic: Inconsistent behaviour when changing TForm.ShowInTaskbar  (Read 1493 times)

Arioch

  • Sr. Member
  • ****
  • Posts: 421
Inconsistent behaviour when changing TForm.ShowInTaskbar
« on: September 15, 2022, 07:24:06 pm »
Action sequence:

  • - Create and show a form with one value of ShowInTaskbar
  • - Change that value after the fact
  • - Optionally - hide the form and show it again, albeit this workaround does not have to be needed

If you start from one value of the property - then after the fact (after a form being shown for the first time) changing value is appropriately changing the visible applicaiton behavior.  If you start from another value - the visible application behavior is not changed, making user think the function was not implemented.

More details in issue tracker, #39883

One can just prohibit changing the property as soon as TForm.HandleAllocated = True, but this might be unneededly restrictive.

Other option would be to patch the LCL sources to make the behaviour consistent.
This, however, requires a choice to be made and documented, WHAT is the goal, what is the "ideal behavior" that implementaiton should strive to implement.

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39883#note_1090054614

In this linked comment i outlined the existing choices, and also provided a demo-project, that, i believe, simulates possible patching implementations, so you could test and feel it.
« Last Edit: September 15, 2022, 07:27:12 pm by Arioch »

 

TinyPortal © 2005-2018