Hi,

Am Sonntag, den 06.11.2005, 12:49 +0100 schrieb Mattias Gaertner:
[...]
> > 
> > um, to sum it up, earlier the bug was because of, in chronological
> > order,
> > 
> > - the application is started
> > - the form is created
> > - In the TCustomForm.Create, FShowInTaskBar is set according to what
> > MainForm points to, which is nil, 
> 
> I fixed the GetShowInTaskBarDefault to check if MainForm=nil.

nice :)


> > hence FShowInTaskBar False
> > - TCustomForm.Create returns
> > - the MainForm is set to the form just created, too late
> > - the Form is Shown
> > - my modification does thus:
> >  procedure TCustomForm.DoShow;
> >  begin
> > +  HandleNeeded;
> > +  TWSCustomFormClass(WidgetSetClass).SetShowInTaskbar(Self,
> > FShowInTaskbar);
> > +
> >    if Assigned(FOnShow) then FOnShow(Self);
> >  end;
> >  which makes it do anything at all with ShowInTaskbar, as opposed to
> > before. 
> > - *However*, FShowInTaskbar is False since it was set in the
> > constructor. I feel uneasy changing properties underneath the programmer
> > without notifying him, so I don't "fix it" within DoShow (i.e. set it to
> > True when nobody is looking :))
> 
> Good.
> 
>  
> > To fix the whole thing once and for all, have GetShowInTaskBarDefault
> > return always True and just have the programmer set it to false manually
> > for the forms he wants. 
> > 
> > 
> > [Note that that is better either way, because the programmer has to
> > bring the windows that aren't shown in the taskbar to the front
> > programmatically - since the user can't do it 
> 
> Sure he could. Many wm brings a clicked window to the front.

Oh...
yeah, I thought of a user like me which usually has <= 8 (cm^2) of free
space on the screen .. yeah, chaotic ^^

I'd like all of lazarus to pop up when I click on the only remaining
taskbar icon,which is the mainidebar. hence :)

> 
> 
> > - (for example in reaction
> > to activating the mainform). At least then it's obvious since he also
> > has to set ShowInTaskBar to False himself, so he asked for it, he got
> > it ...]
> > 
> > 
> > As a side note:
> > 
> > Note also that in order to change the showintaskbar property, the form
> > has to be [hidden and] reshown as per EWMH standard
> > http://standards.freedesktop.org/wm-spec/wm-spec-1.4.html , search for
> > "The Window Manager SHOULD honor _NET_WM_STATE whenever a withdrawn
> > window requests to be mapped.". 
> > 
> > That is, the window has to be hidden, the flag set, and the window shown
> > again (when it was visible yet in the first place, that is).
> 
> Ah I see.
> So we have two possibilities for gtk1:
> a) Find out, how to make Show modal to not hide the mainform form the
> taskbar

hmm ? What do you mean ?

> b) Hide/Show all windows on Show Modal - unpleasant
> 
> I don't want to invest much time in the gtk1 interface. I'm currently
> working on the IDE and the LCL and after one of the next releases will
> switch to gtk2.

I see

> 
>  
> > i.e.
> > SetShowInTaskBar:
> >   OldVisible := Visible;
> >   if OldVisible then Hide;
> >   FShowInTaskbar := Value;
> >   gtk_window_set_skip_taskbar(... , not FShowInTaskbar);
> >   if OldVisible then Show;
> 
> Mattias

cheers,
   Danny


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to