Mac dropdown menu bug in 3.3.1?

Hello all.

It seems that the 3.3.1 build has an interface issue. It appears that not many, or none, of the dropdown options work (e.g., Dispatch, Place, Return).

Also, the “right-click” function appears to have moved from the CMD key to the CTRL key?

  • Model: MacBook Pro (17-Inch, Mid 2010)
  • Operating System: High Sierra (10.13.6)
  • CPU: 2.53 GHz Intel Core i5
  • Memory: 8 GB
  • Video Card: NVIDIA GeForce GT 330M/Intel HD Graphics
  • Vassal version: 3.3.1
  • Java version. JRE-8u251
  • Vassal module names that this issue was tested for: Colonial Twilight 1.3, Tank Duel 1.5 and A Distant Plain 2.0
  • I have gone through some debugging to hopefully assist. In a nutshell, I’ve reinstalled all software (VASSAL and Java), and the pop menus appear, but the options do not work. I’ve removed all software, downloaded the latest versions again, and I still cannot “right-click” on pieces to use the menus. I then download VASSAL version 3.2.17 and the menu works just fine; I can dispatch and return without an issue. I have done all testing with a saved game, as well as starting new games. 3.2.17 works just fine.

Let me know if you need any other information.

Thank you in advance.
Greg

Thus spake knucklesmagoo:

Hello all.

It seems that the 3.3.1 build has an interface issue. It appears that
not many, or none, of the dropdown options work (e.g., Dispatch, Place,
Return).

Also, the “right-click” function appears to have moved from the CMD key
to the CTRL key?

  • Model: MacBook Pro (17-Inch, Mid 2010)
  • Operating System: High Sierra (10.13.6)
  • CPU: 2.53 GHz Intel Core i5
  • Memory: 8 GB
  • Video Card: NVIDIA GeForce GT 330M/Intel HD Graphics
  • Vassal version: 3.3.1
  • Java version. JRE-8u251
  • Vassal module names that this issue was tested for: Colonial Twilight
    1.3, Tank Duel 1.5 and A Distant Plain 2.0
  • I have gone through some debugging to hopefully assist. In a nutshell,
    I’ve reinstalled all software (VASSAL and Java), and the pop menus
    appear, but the options do not work. I’ve removed all software,
    downloaded the latest versions again, and I still cannot “right-click”
    on pieces to use the menus. I then download VASSAL version 3.2.17 and
    the menu works just fine; I can dispatch and return without an issue. I
    have done all testing with a saved game, as well as starting new games.
    3.2.17 works just fine.

In order to troubleshoot this, we need to know when these bugs first
appeared.

Would you please try 3.3.0-beta3 and 3.3.0-beta4 and check in each of
them whether you see these bugs. You can find these two beta releases
on our releases page:

github.com/vassalengine/vassal/releases

(Note that uninstalling and reinstalling VASSAL or Java will solve only
a very narrow range of problems, mainly those which prevent VASSAL from
running. If VASSAL starts, reinstalling is a waste of your time unless
you have specific reason to believe Java or VASSAL has become corrupted.)


J.

Hello Joel. Thanks for the reply.

I started a clean Colonial Twilight game, and tested both builds.

Beta3 works - along with maintaining CMD as the dropdown menu “right-click” key. Beta4 move the “right-click” key to CTRL and does not work.

Let me know what other tyres you’d like me to to kick.

Cheers.
Greg

From another thread, Joel noticed that I use a Mac and asked if I have any insight into this bug. I can only say that I have not noticed one like it and I am doing a lot of work with the C&C Napoleonics module at the moment under Vassal 3.3.1, also using C&C Ancients for games, and using right-click drop-down menus all the time.

My config:-

  • Model: MacBook Pro (13-Inch, 2016)
  • Operating System: macOS Catalina (10.15.5)
  • CPU: 2 GHz Dual-Core Intel Core i5
  • Memory: 8 GB
  • Video Card: Intel Iris Graphics 540 1536 MB
  • Vassal version: 3.3.1
  • Java version - whatever is bundled with Vassal, right ?

Hi Mark. Thanks for coming over to this bug.

If you can’t replicate the right-click key change, or don’t have an issue with the pop-up menus, then I would assume it’s a legacy issue with High Sierra? Again. beta version 3 is what I’m using now, and it’s solid.

Let me know if this shines any light, or if you want me to feedback more information.

Cheers.
Greg

Thus spake knucklesmagoo:

Hello Joel. Thanks for the reply.

I started a clean Colonial Twilight game, and tested both builds.

Beta3 works - along with maintaining CMD as the dropdown menu
“right-click” key. Beta4 move the “right-click” key to CTRL and does
not work.

Hang on, what do you mean by “key” here?

Would you describe exactly the steps you’re expecting to work which aren’t?


J.

Hello again, Joel.

I’m on a MacBook Pro, and use the trackpad as the mouse. So, to get the right-click option working, that would be available to you on a mouse, you have to hold down another key.

So, if I click on a piece with the trackpad, I can select it - and drag and drop the piece - but I can’t view the pop-up menus until I press a key. In past version of VASSAL, I’ve been using the CMD key, right beside the spacebar. The key that allows me to call up the pop-up menu for units has now moved to the CTRL key, between the fn and the alt key.

Sorry if I wasn’t clear.

I’m currently in a game with two other Mac owners, and I’m trying to gather their computer specs - as they do not appear to be having an issue with the 3.3.1 build. I’ll post this information in my next message.

Thanks in advance.
Greg

Is there a reason you can’t (or prefer not to) use a two-finger tap/press of the trackpad as a right-click?

Hi again. Habit, really. I work on a computer all day, and I use key combinations for various tasks.

Would you like me to install 3.3.1 and try the two-finger tap?

Let me know.
Cheers.
Greg

Thus spake knucklesmagoo:

I’m on a MacBook Pro, and use the trackpad as the mouse. So, to get the
right-click option working, that would be available to you on a mouse,
you have to hold down another key.

So, if I click on a piece with the trackpad, I can select it - and drag
and drop the piece - but I can’t view the pop-up menus until I press a
key. In past version of VASSAL, I’ve been using the CMD key, right
beside the spacebar. The key that allows me to call up the pop-up menu
for units has now moved to the CTRL key, between the fn and the alt key.

Thanks for the clear explanation.

I understand how the problem was introduced now. There was a change we
made (8b1b370bce) to adjust for a difference in how Java 9+ report mouse
events, between 3.3.0-beta3 and 3.3.0-beta4, and I’m nearly certain that’s
the cause of the problem you’re seeing. I’ll look into a fix this evening.


J.

Thanks for keeping me updated, Joel.

Fingers crossed.

Best,
Greg

How does that relate to the mouse stuff Brian was looking at? I know it didn’t make it into production so far but could there be some overlap there?

Different stuff in this case.

Try this build:

vassalengine.org/~uckelman/t … macosx.dmg

I think this will restore the former behavior of Ctrl + Left Click producing a Right Click on a Mac. (Aside: This makes me think that Ctrl + Left Click has never worked for deselecting selected units on the Mac…)

I’m still looking into the Cmd key issue. There was a change at fb68073c where I switched us from checking 'MouseEvent.isMetaDown() for raising context menus to 'MouseEvent.isPopupTrigger() because every single thing I read clearly stated that the correct way to do it is to check MouseEvent.isPopupTrigger()… and it would be totally typical for Java if the correct way to do it is broken.

Hello? I haven’t heard from anyone having the right-click problem on Macs about the test build I posted above. There won’t be a fix which goes into a release until I get confirmation that the problem is solved.

I tested the 3.3.1-186 build on my MacBook Pro and CTRL+click produces a right-click menu, but the menu items don’t work. When I use two-finger tap gesture (as set in macOS Settings for right-click), then the menu and the menu item work correctly.

I tried with NoRetreat module. When I CTRL+click on a marker to get the contextual menu for it the marker gets deselected. This seems to be why the menu item does not execute on the marker. When I drag select 2 markers to select both, and then CTRL+click on one of them, the activated marker gets deselected, but the other one I am able to delete (from Delete trait). CTRL+click on a marker that was not yet selected keeps it deselected.

I am not sure what is meant by the “CMD click” thing. The “META” keyboard shortcut works fine with CMD. I don’t know what a CMD click is supposed to do.

This is an example of why we have to check isPopupTrigger() when we’re doing other things than just putting up context menus. The context menu got put up, but elsewhere in the event’s lifetime some method that thought it had nothing to do with context menus decided to deselect the marker because it saw an otherwise-plausible-looking mouse click. If said method had filtered with if (!isPopupTrigger()) in addition to checking whatever other conditions it wanted (is left mouse? isn’t right mouse? whatever) then this wouldn’t happen.

Any time we find isPopupTrigger() to be true, then it’s kind of a “flag on the play” – no matter what mouse button we think we see down, we need to avoid doing anything that would disrupt the context menu flow. There’s a whole necessary-vs-sufficient thing at play. Like in order to safely take many non-context-menu actions, it is necessary for isPopupTrigger() to be false but not sufficient – we also need to check buttons and things to make sure the conditions are otherwise right for the non-context-menu stuff we want to do.

Platform MacOS 10.15.5, MacBook Pro (13-inch, 2020)

I am not sure if this is relevant or not but I notice that Control-Click select behaves (to my mind) strangely under Vassal 3.2.17, perhaps in-line with Cattlesquat’s comments about other code interfering with the select/command sequence.

Move the pointer to an unselected piece:
Control-Click once - does nothing
Control-Click again - selects the piece
Control-click again - deselects the piece
Control-click any number of further times, piece remains deselected.

Try a Control-Click on an already selected piece. The same behaviour is observed - first click DE-selects the piece, second selects, subsequent deselects and further presses don’t affect the piece. In both cases, if you remove your finger from the Control key and then resume Control-Clicks, the behaviour will reset (ie second click will select the piece again etc).

Contrast this with other key click / select combos…

  1. Right-Click as a Trackpad two-finger press selects the item and displays a menu. This behaviour repeats for subsequent repeats of the Right-Click. Same occurs using Command-Click.

  2. Select a piece with a plain Click. The piece is selected first time and remains selected if you continue to plain Click on the piece.


I had done the same tests as bdzga and got the same results.

Testing on Vassal 3.3.1-186 and looking at piece selection, Control-Click never seems to select the piece (even on the second Control-Click, unlike Vassal 3.2.17).
As observed by bdzga in his testing, if you select multiple pieces (e.g. by SHIFT-click) and finally click on a piece by Control-Click, then select a menu command from the menu that Control-Click has displayed, the Command will be executed on all selected pieces that will accept that command. It is ignored by the Control-Click piece, simply because that piece is not selected.

Mark

Noting that Apple’s documentation says that Control-Click is the right-Click keyboard substitute, I wonder why Command-Click was used in Vassal 3.2.17. It must have been at a low level to override Control-Click; at least that is to say, I could find no apparent way to override Control-Click for Right-Click at the MacOS user level.

\Perhaps somewhere in the Vassal code, Control-Click is getting messed with and this is why Command-Click has been substituted instead in Vassal 3.2.17 and (presumably) much earlier.

Thus spake bdgza:

I tested the 3.3.1-186 build on my MacBook Pro and CTRL+click produces a
right-click menu, but the menu items don’t work. When I use two-finger
tap gesture (as set in macOS Settings for right-click), then the menu
and the menu item work correctly.

That’s as expected, as there are only changes for Ctrl+click in that build.
I didn’t make any changes for menu items, as I wanted to address the issues
one at a time.

I am not sure what is meant by the “CMD click” thing. The “META”
keyboard shortcut works fine with CMD. I don’t know what a CMD click is
supposed to do.

I don’t know either. Ideally whoever reported that, or some other Mac
user who understands, would explain it.


J.