Prevent unwanted click on GUI?

Post Reply
User avatar
IXix
Posts: 1113
Joined: Wed Nov 23, 2011 3:24 pm

Prevent unwanted click on GUI?

Post by IXix »

If I double-click my machine to open the GUI and the param window opens up under the mouse, the GUI behaves as if I had clicked the control that appears under the mouse ie. a click from the "double-click to open" leaks into the GUI.

Is there a way to stop this from happening?
oskari
Site Admin
Posts: 296
Joined: Mon Nov 21, 2011 2:04 pm

Re: Prevent unwanted click on GUI?

Post by oskari »

I haven't seen this before, but maybe it's a buzz bug.
User avatar
IXix
Posts: 1113
Joined: Wed Nov 23, 2011 3:24 pm

Re: Prevent unwanted click on GUI?

Post by IXix »

oskari wrote:I haven't seen this before, but maybe it's a buzz bug.
Try the PatchBay machine I posted. If the patch control pops up under the mouse, the pin under the mouse will get set. Don't want accidental routing changes just by opening the GUI! :o
oskari
Site Admin
Posts: 296
Joined: Mon Nov 21, 2011 2:04 pm

Re: Prevent unwanted click on GUI?

Post by oskari »

IXix wrote: Try the PatchBay machine I posted. If the patch control pops up under the mouse, the pin under the mouse will get set. Don't want accidental routing changes just by opening the GUI! :o
I think it's your MouseEnter handler. You should set a 'pressed' flag in MouseDown instead of checking MouseButtonState.Checked because the mouse button is still down when the window is created and MouseEnter fires.
User avatar
IXix
Posts: 1113
Joined: Wed Nov 23, 2011 3:24 pm

Re: Prevent unwanted click on GUI?

Post by IXix »

oskari wrote:I think it's your MouseEnter handler. You should set a 'pressed' flag in MouseDown instead of checking MouseButtonState.Checked because the mouse button is still down when the window is created and MouseEnter fires.
Ah that makes sense. Thanks!
Post Reply