dannym wrote:
Hi,
I'm trying to get ShowInTaskbar for gtk2 working.
I tried to do it as in the attached patch for a quick test. Doesn't
work.
It has to do with some ridiculously complicated dependency of the
default of ShowInTaskbar on MainForm. Can't get it to work.
The symptoms after the patch are:
- no form at all is still in the taskbar
Helpp ? :)
(P.S. I suggest getting rid of GetShowInTaskBarDefault's dependency on
MainForm, after all, the programmer can still set it the ~one time the
mainform changes over the lifetime of his project)
cheers,
Danny
Index: lcl/include/customform.inc
===================================================================
--- lcl/include/customform.inc (Revision 8068)
+++ lcl/include/customform.inc (Arbeitskopie)
@@ -696,6 +696,9 @@
------------------------------------------------------------------------------}
procedure TCustomForm.DoShow;
begin
+ HandleNeeded;
+ TWSCustomFormClass(WidgetSetClass).SetShowInTaskbar(Self, FShowInTaskbar);
+
if Assigned(FOnShow) then FOnShow(Self);
end;
This part of the patch breaks lazarus on windows.
If I remove those lines, I works again.
if you do TWSCustomFormClass(WidgetSetClass).SetShowInTaskbar(Self,
FShowInTaskbar); it recreates the windows. It will be shown again and
receive a LM_SHOW message and execute DoShow.
Shall remove those two lines (for now), until you have found a better
place to add them, maybe in the gtk(2) interface before sending the
LM_SHOW message?
Vincent.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives