[sip-comm-dev] Re: [sip-comm-issues] [Issue 603] Systray JPopup menu doesn't disappear when the focus is lost


#1

Hi Emil,

Do we know what the issue is here? I've tried on two occasions to fix this,
and I've been stumped both times. I'd really like to see in resolved, as I
find it rather distracting. I'd gladly spend some more time on it but I'm
afraid I don't entirely understand the way the SC systray menu is
constructed.

-Alan

···

On Wed, Jul 8, 2009 at 9:36 AM, <emcho@dev.java.net> wrote:

https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=603

User emcho changed the following:

               What |Old value |New value

================================================================================
               Priority>P3 |P4

--------------------------------------------------------------------------------
       Target milestone|1.0 |1.1

--------------------------------------------------------------------------------

------- Additional comments from emcho@dev.java.net Wed Jul 8 13:36:05
+0000 2009 -------
This would be handled in a later release.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: issues-help@sip-communicator.dev.java.net


#2

Hey Alan,

I should have asked whether someone was interested in looking into this
before moving it then. It's perfectly fine with me to bring it back if
you are willing to dig some more. Feel free to reschedule back to 1.0.

I believe the issue has to do with the fact that we have no way to
detect focus loss for awt components ... or at least we haven't found any.

There must be a way though. Detecting the active application (rather
than only the window) could be one for example.

Other ideas anyone?

Cheers
Emil

Alan Kelly wrote:

···

Hi Emil,

Do we know what the issue is here? I've tried on two occasions to fix
this, and I've been stumped both times. I'd really like to see in
resolved, as I find it rather distracting. I'd gladly spend some more
time on it but I'm afraid I don't entirely understand the way the SC
systray menu is constructed.

-Alan

On Wed, Jul 8, 2009 at 9:36 AM, <emcho@dev.java.net > <mailto:emcho@dev.java.net>> wrote:

    https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=603

    User emcho changed the following:

                   What |Old value |New value
    ================================================================================
                   Priority>P3 |P4
    --------------------------------------------------------------------------------
           Target milestone|1.0 |1.1
    --------------------------------------------------------------------------------

    ------- Additional comments from emcho@dev.java.net
    <mailto:emcho@dev.java.net> Wed Jul 8 13:36:05 +0000 2009 -------
    This would be handled in a later release.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    issues-unsubscribe@sip-communicator.dev.java.net
    <mailto:issues-unsubscribe@sip-communicator.dev.java.net>
    For additional commands, e-mail:
    issues-help@sip-communicator.dev.java.net
    <mailto:issues-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Egidijus,

That is exactly how we handle such situations in other cases, such with the
dialpad, so it's a good sugggestion. Unfortunately, the systray (at least in
some environments) uses java.awt.PopupMenu and not java.swing.JPopupMenu
(for reasons that I can't entirely recall). awt GUI components such as
PopupMenu doesn't seem to support WindowListener or WindowFocusListener.

-Alan

···

On Wed, Jul 8, 2009 at 12:57 PM, Egidijus Jankauskas < egidijus.jankauskas@email.lt> wrote:

Hi Emil,

On 8 Jul 2009, at 17:30, Emil Ivov wrote:

I believe the issue has to do with the fact that we have no way to

detect focus loss for awt components ... or at least we haven't found any.

I think this could be done by using WindowListener and WindowFocusListener.
WindowEventDemo gives a focus loss message when it looses focus:

http://java.sun.com/docs/books/tutorial/uiswing/examples/events/index.html#WindowEventDemo

Cheers,
Egidijus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi Emil,

···

On 8 Jul 2009, at 17:30, Emil Ivov wrote:

I believe the issue has to do with the fact that we have no way to
detect focus loss for awt components ... or at least we haven't found any.

I think this could be done by using WindowListener and WindowFocusListener. WindowEventDemo gives a focus loss message when it looses focus:
http://java.sun.com/docs/books/tutorial/uiswing/examples/events/index.html#WindowEventDemo

Cheers,
Egidijus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi all,

Minor update: I haven't had a lot of time to look at this, but the
time I have spent has been very frustrating. I've tried changing and
adding lots of properties, with no visible effects on the menu.

The only thing I've discovered is that there actually appears to be a
problem with the systray menu's behavior no matter whether Swing or
AWT is used.

-Alan

···

On 7/8/09, Alan Kelly <akoriolesfan@gmail.com> wrote:

Hi Egidijus,

That is exactly how we handle such situations in other cases, such with the
dialpad, so it's a good sugggestion. Unfortunately, the systray (at least
in
some environments) uses java.awt.PopupMenu and not java.swing.JPopupMenu
(for reasons that I can't entirely recall). awt GUI components such as
PopupMenu doesn't seem to support WindowListener or WindowFocusListener.

-Alan

On Wed, Jul 8, 2009 at 12:57 PM, Egidijus Jankauskas < > egidijus.jankauskas@email.lt> wrote:

Hi Emil,

On 8 Jul 2009, at 17:30, Emil Ivov wrote:

I believe the issue has to do with the fact that we have no way to

detect focus loss for awt components ... or at least we haven't found
any.

I think this could be done by using WindowListener and
WindowFocusListener.
WindowEventDemo gives a focus loss message when it looses focus:

http://java.sun.com/docs/books/tutorial/uiswing/examples/events/index.html#WindowEventDemo

Cheers,
Egidijus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Thanks for the update, Alan,

Alan Kelly wrote:

Hi all,

Minor update: I haven't had a lot of time to look at this, but the
time I have spent has been very frustrating. I've tried changing and
adding lots of properties, with no visible effects on the menu.

My condolences!

The only thing I've discovered is that there actually appears to be a
problem with the systray menu's behavior no matter whether Swing or
AWT is used.

When you say Swing or AWT, do you mean switching between jdic's and J6's
systray support? If not, and if all these problems are coming from J6
then maybe we should think about going back to jdic for this feature at
least.

Cheers
Emil

···

-Alan

On 7/8/09, Alan Kelly <akoriolesfan@gmail.com> wrote:

Hi Egidijus,

That is exactly how we handle such situations in other cases, such with the
dialpad, so it's a good sugggestion. Unfortunately, the systray (at least
in
some environments) uses java.awt.PopupMenu and not java.swing.JPopupMenu
(for reasons that I can't entirely recall). awt GUI components such as
PopupMenu doesn't seem to support WindowListener or WindowFocusListener.

-Alan

On Wed, Jul 8, 2009 at 12:57 PM, Egidijus Jankauskas < >> egidijus.jankauskas@email.lt> wrote:

Hi Emil,

On 8 Jul 2009, at 17:30, Emil Ivov wrote:

I believe the issue has to do with the fact that we have no way to

detect focus loss for awt components ... or at least we haven't found
any.

I think this could be done by using WindowListener and
WindowFocusListener.
WindowEventDemo gives a focus loss message when it looses focus:

http://java.sun.com/docs/books/tutorial/uiswing/examples/events/index.html#WindowEventDemo

Cheers,
Egidijus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net