Closed zeronoises closed 3 years ago
Hi - that does sound odd and unlikely you are missing anything obvious - should just be a left click and drag.
Let’s see what Marc says about it
That's a very strange problem, and so far it doesn't seem to not be reproducible. It works properly on my two different Ubuntu systems, and we've had confirmation that two other Linux users have no problems either (one Ububtu and one Mint).
It will require some back and forth I think to work out the problem, so perhaps we can start with a simple first test:
Do you have any other modules with displays or clickable areas that you can compare with to see if those are working? Here are some examples to test (some are commercial, but I'll list them anyways just in case):
I have used Tact and Wave in many patches... BZ Envelope works fine too.
BTW - the nodes still react to hovering with the cursor.
Good to know! Just off hand, do you know how to compile Rack plugins?
Yep - I have the SDK installed.
Excellent, can you clone this repo please, and try the free version of ShapeMaster?
https://github.com/MarcBoule/MindMeldModular
Well, well - the free version works perfectly!
And now - mysteriously - it doesn't....
wow, very strange!
when you hover over the node, you should see it get bigger, and then when you left-click (and hold for one second for example) does it stay big or do you see it go smaller again (all the while keeping the mouse directly over the node)?
Okay - interesting. The first couple of times I try that the node shrinks again. But on maybe the third click it will hold, and I 'm able to drag the node. I try this on both Pro and free - same. Then I go back and try the same thing again. Failure. I shut down Rack and restart - still failure....
Perhaps it's some weird timing where the sequence of mouse related events (onButton vs onDragStart) are not being triggered in a consistent order. I'm just guessing here, and I don't know how deep you would like to go into this, but we can proceed in two ways from here I think:
a) I can add some debug statements to the mouse code for the display, and we can watch in the console as you make clicks to see if those events are being called in their expected order
b) we can look into perhaps reimbursing your purchase
I can't guarantee that option a) would lead to a solution however, so I prefer to be honnest with you if you don't want to spend more time on this.
Perfectly reasonable: I'd like to try a debug version please!
Ok, I have set up a new branch called "zero" with extra event logging statements in the terminal. First you will need to go change branches in the MindMeldModular repo:
git checkout zero
Then make clean
and then re-make
a fresh version of the plugin.
Then starting from an initialized ShapeMaster module, just try to click-drag the center node like this, and see how those events show up in the terminal upon successful and unsuccessful cases. The expected listing of events should be like this:
Small tip, if you want the logging to be compact, onDragMove is called every GUI frame, so it can be useful to temporarily set your refresh rate in Rack to a very low setting (I used 12Hz in my test). Hope this will reveal something!
Should I start Rack from the terminal to see these messages - cos that produces no output...
you can yes, or once finished if you close Rack you should see it in the logfile (log.txt I think). But much better to launch Rack from the terminal in debug mode, by typing "make debug" or equivalently "./Rack -d", but then there may be the issue of which plugin location it will use (it uses another I think), so perhaps it's simpler to just look at the log file.
Ok, so then events were in the correct order, but it appears as if every click that was made was not registering it on a node (since the pt = 270
we see in the log indicates that the background was clicked). so just to make sure I understand:
Now according to my code, it's seems impossible for the node to have been big and for it to not have registered the correct number when it was clicked, since the pt number we see when we click it is the exact same number that is used to tell it to draw a big node.
Just in case, here is a picture of what a node looks like when it is hovered over with the mouse and it gets bigger: (the node on the right has the mouse over it, but we can't see the mouse because of the screen capture)
So if you are clicking a big (hovered-over) node, and it's registering 270 (in the log file), I'm very much puzzled.Do you see if the node momentarily gets small again when the click happens, and does it stay big if you click and hold the button and mouse over the node? (if you prefer showing with a video instead of all these questions, please feel free to do so). I've really never come across this behavior, and we now have a few hundred people using the module... so strange!
When I hover the node enlarges. When I click the node shrinks - and stays shrunk as long as I hold down the mouse button. On release the node enlarges again. If I mouse-over it enlarges as I pass over - but not if the button is down.
From what you describe, it sounds to me like your mouse is registering a different position when it is clicking than when it is hovering. So you can be hovered over a node, and it enlarges, but the act of clicking moves the mouses registered position somehow so it is no longer over the node (and the node therefore shrinks because your mouse is now registering as being over the background, not the node.
You don't happen to have another mouse you can try with do you?
Plugged in a spare mouse - same result, although I did manage an initial successful drag, as has sometimes happened before. The log file shows one series of 'onDragMove, left, pt = 1' before reverting to 'pt = 270' again. Don't think it's the mouse.
I'll go over the mouse code again in a few hours to see if I can spot anything that could explain this behavior, it might have to do with screen coordinates and resolution, dpi, that sort of stuff, since there are internally two methods to get the mouse position. I think we are narrowing in on something, Steve's diagnosis seems to be very relevant.
Okay. Thanks for putting in the time on this. I'm afraid I won't be up much longer though - talk to to you tomorrow.
Could my WM be of consequence? It's Spectrwm by the way.
Sure - Marc's gone to have some dinner now anyway but he will be taking a look at the code again a bit later tonight.
Fingers crossed that we (he :) ) can find a solution to your problem - at least we have an idea of what seems to be happening now.
Sorry I'm not sure I followed your last comment at all - what's WM?
I'd also imagine that if you click around the node, close to it but not over it, you might find a place where it does grab it every time - as it sounds like there is some kind of position offset happening when the mouse button is clicked. For example you might find if you click off the node at say 7 o'clock or 3 o'clock or whatever, it grabs it.
Given that your grabs are occasionally successful, this offset may be very small (such that occasionally you are clicking slightly off centre of the node in just the right direction)
Could my WM be of consequence? It's Spectrwm by the way.
Not really sure, I'll try some things on my end before. EDIT: original message redacted (see next comment below)
@Torinbob WM : https://wiki.archlinux.org/index.php/window_manager
Ok, I tried a different internal method of handling mouse dragging, and if you could pull the "zero" branch, rebuild and try it now, I'd be very curious to see if that did the trick. Thanks also for your patience with this, it's very much appreciated!
I'm afraid that behaves exactly as before - and the log file has no debug entries now.
This one is really challenging! I removed the debug entries since I didn't think we would need them, but I think I'll bring them back and add some mouse position information, so we can see how the cursor is being read.
In this current version, the code is very similar to the one in Stoermelder's Arena module, if you have that installed, are you able to drag those nodes?
Arena works perfectly well for me...
ok, great to know, I'll try more changes, but to avoid bothering you with all this, I'm installing Arch Linux on one of my laptops, so if I can reproduce it here, it will be less trouble for you. I'm installing version 2021.04.01 and I will use the same WM as you, so hopefully it will do the bug on my setup also :-)
Just a thought - I'm using the git version of spectrwm from the AUR....
Ok, so to continue this long thread :-) installing Arch Linux has proven to be much above my Linux skills unfortunately, after 3 hours I was still not getting it to boot, so I think I will revert to making more changes to the module and preparing a version with lots of tests for you. It will take a bit more time though, my vaccine is giving me some fever and it's not easy to be in front of the computer. I guess that means the vaccine is working, haha! Stay tuned :-)
No worries - take as much time as you need.
I did a major overhaul to the code, I'd be curious to see if you're still having the problem now (it's still in the "zero" branch). I also added some more detailed debug logging, so if the problem is still there, we should have more to work with. Fingers crossed!
Complete success! Log file attached: log.txt
Excellent!! Glad we got it :-) I'll send you a new build of ShapeMaster Pro when the debug code gets removed and the fix is copied over to the Pro version also.
If you're on the VCV forum or FB for VCV Rack, can you send me your email in private please (or post here if ever you don't mind it being public)? I would need the one that is tied to you VCV Rack account.
I'm fine with it being here: zeroliberationarmy at gmail dot com
Excellent, I just sent the build. I'll close the issue, but feel free to follow up if ever there's a problem.
OS: Arch Linux Bought and downloaded (through the library) today. Everything I've checked on so far functions, but I'm unable to grab nodes on the screen to move them. Right clicking on them produces the expected result, but a left click gives me nothing. Experimented with all the Mod keys - shift click works as expected. Re-downloaded. No joy....
Am I missing something obvious?