GtkListPeer.java (handleEvent): Fix generation of ActionEvents for mouse double-clicks.
2003-12-17 Fernando Nasser <fnasser@redhat.com> * gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation of ActionEvents for mouse double-clicks. From-SVN: r74745
This commit is contained in:
parent
310b075bd8
commit
f84241ba7d
2 changed files with 15 additions and 3 deletions
|
@ -135,8 +135,15 @@ public class GtkListPeer extends GtkComponentPeer
|
|||
if (!me.isConsumed ()
|
||||
&& (me.getModifiers () & MouseEvent.BUTTON1_MASK) != 0
|
||||
&& me.getClickCount() == 2)
|
||||
postActionEvent (((List)awtComponent).getSelectedItem (),
|
||||
me.getModifiers ());
|
||||
{
|
||||
String selectedItem = ((List)awtComponent).getSelectedItem ();
|
||||
|
||||
/* Double-click only generates an Action event
|
||||
if something is selected */
|
||||
if (selectedItem != null)
|
||||
postActionEvent (((List)awtComponent).getSelectedItem (),
|
||||
me.getModifiers ());
|
||||
}
|
||||
}
|
||||
|
||||
if (e.getID () == KeyEvent.KEY_PRESSED)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue