From Glen.Schrader at Entero.com Wed Mar 28 09:54:06 2012 From: Glen.Schrader at Entero.com (Glen Schrader) Date: Wed, 28 Mar 2012 10:54:06 -0600 Subject: popups Message-ID: <055789E67C677541B9E81A1E55966D5107DF9FFC@exchange-2.Entero.com> Hi I'm trying to utilize this project for running FEST tests headless (great work btw!). I think I'm getting close however one thing that I've hit is an issue with right click popups. I think the issue might be with the way the MouseEvent is created in the EventData class: return new MouseEvent((Component) source, id, time, modifiers, x, y, clickCount, false, getButton(modifierChange)); The false is for the popupTrigger parameter. I'm thinking this has to be true when right clicking. Am I correct or am I missing something? Thanks, Glen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/caciocavallo-dev/attachments/20120328/e47f73b3/attachment.html From roman at kennke.org Wed Mar 28 13:24:40 2012 From: roman at kennke.org (Roman Kennke) Date: Wed, 28 Mar 2012 22:24:40 +0200 Subject: popups In-Reply-To: <055789E67C677541B9E81A1E55966D5107DF9FFC@exchange-2.Entero.com> References: <055789E67C677541B9E81A1E55966D5107DF9FFC@exchange-2.Entero.com> Message-ID: <1332966280.17876.73.camel@mercury.localdomain> Hi Glen, > Hi I?m trying to utilize this project for running FEST tests headless > (great work btw!). Good to hear! Glad you like it. We are about to make a release of Cacio (the first one!), and I'll be happy to fix that little issue before doing it. > I think I?m getting close however one thing that I?ve hit is an > issue with right click popups. I think the issue might be with the way > the MouseEvent is created in the EventData class: > > > > return new MouseEvent((Component) source, id, time, > modifiers, > > x, y, clickCount, false, > > getButton(modifierChange)); > > > > The false is for the popupTrigger parameter. I?m thinking this has to > be true when right clicking. Am I correct or am I missing something? This seems to be correct. There are desktop environments where the popup trigger is something else (like MacOS, CTRL+leftclick AFAIK), but right click seems right for most others. Several ways to handle it come to mind: - We could provide support for emulating different environments, depending on some setting (sysproperty?). - We could declare that for the Cacio environment (heh) right-click is it :-) I lean towards the latter solution, at least until somebody really needs more flexibility (e.g. when testing for MacOS environment). What do you (and others) think? Cheers, Roman From Glen.Schrader at Entero.com Wed Mar 28 15:32:07 2012 From: Glen.Schrader at Entero.com (Glen Schrader) Date: Wed, 28 Mar 2012 16:32:07 -0600 Subject: popups In-Reply-To: <1332966280.17876.73.camel@mercury.localdomain> References: <055789E67C677541B9E81A1E55966D5107DF9FFC@exchange-2.Entero.com> <1332966280.17876.73.camel@mercury.localdomain> Message-ID: <055789E67C677541B9E81A1E55966D5107DFA1FC@exchange-2.Entero.com> FEST uses right click, i.e. in BasicRobot.showPopupMenu click(invoker, location, RIGHT_BUTTON, 1); So I would vote to just use right click for now. I was playing around with the source and hacked in what I think is right for setting the popup value in the MouseEvent. We noticed a problem in CTCRobotPeer.mouseRelease where it was using the wrong values to set currentModifiers and also moved where it was setting that value to after the event was sent. Attached is the patch file along with some tests. Thanks, Glen -----Original Message----- From: Roman Kennke [mailto:roman at kennke.org] Sent: March-28-12 2:25 PM To: Glen Schrader Cc: caciocavallo-dev at openjdk.java.net Subject: Re: popups Hi Glen, > Hi I?m trying to utilize this project for running FEST tests headless > (great work btw!). Good to hear! Glad you like it. We are about to make a release of Cacio (the first one!), and I'll be happy to fix that little issue before doing it. > I think I?m getting close however one thing that I?ve hit is an > issue with right click popups. I think the issue might be with the way > the MouseEvent is created in the EventData class: > > > > return new MouseEvent((Component) source, id, time, > modifiers, > > x, y, clickCount, false, > > getButton(modifierChange)); > > > > The false is for the popupTrigger parameter. I?m thinking this has to > be true when right clicking. Am I correct or am I missing something? This seems to be correct. There are desktop environments where the popup trigger is something else (like MacOS, CTRL+leftclick AFAIK), but right click seems right for most others. Several ways to handle it come to mind: - We could provide support for emulating different environments, depending on some setting (sysproperty?). - We could declare that for the Cacio environment (heh) right-click is it :-) I lean towards the latter solution, at least until somebody really needs more flexibility (e.g. when testing for MacOS environment). What do you (and others) think? Cheers, Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: unnamed.patch Type: application/octet-stream Size: 14656 bytes Desc: unnamed.patch Url : http://mail.openjdk.java.net/pipermail/caciocavallo-dev/attachments/20120328/e1e67c0e/unnamed.patch