[Project_owners] Custom alert slider

Dan Lee daniel.eric.lee at gmail.com
Tue Jan 10 10:49:24 EST 2006


Many thanks Nickolay!

It was the 'popup=yes' argument that I was missing.

Thanks again.
Dan

On 1/10/06, Nickolay Ponomarev <asqueella at gmail.com> wrote:
>
> Dan Lee wrote:
> > Hi all,
> >
> > In my extension I currently display an alert slider (by using the
> > mozilla alert
> > component) similar to that used by Thunderbird to notify you of new
> mail.
> > Instead of using the existing alert APIs, I want to use my own custom
> > window.
> >
> > I have it mostly working, but there's one thing I can't figure out - how
> > can I
> > force my alert window to have focus, even when Firefox itself does not
> have
> > focus?  The Thunderbird alert, for instance, displays on top of other OS
> > application windows, even if Firefox is minimized.  I would like this
> same
> > functionality. The way I have it now, my alert only has the focus of
> Firefox
> > itself; so if another application window is on top of Firefox, my alert
> > window
> > will show below the other application window. I would like to force it
> > on top of
> > any windows - I know it must be possible since the mozilla
> > showAlertNotification
> > does it somehow, but I can't figure it out.  Maybe I need to utilize
> > some XPCOM
> > interface or something.  Does anyone have any ideas?
>
> You can just look in the source to see how it is implemented:
> http://lxr.mozilla.org/seamonkey/source/toolkit/components/alerts/
>
> In particular I believe you will be interested in this OpenWindow call
> (its set
> of features):
>
> http://lxr.mozilla.org/seamonkey/source/toolkit/components/alerts/src/nsAlertsService.cpp#120
>
> 120   rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank",
> 121                  "chrome,dialog=yes,titlebar=no,popup=yes", argsArray,
> 122                  getter_AddRefs(newWindow));
>
> Nickolay
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060110/6f27262f/attachment.htm


More information about the Project_owners mailing list