Page 1 of 1
					
				Prevent unwanted click on GUI?
				Posted: Fri Apr 19, 2013 9:12 pm
				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?
			 
			
					
				Re: Prevent unwanted click on GUI?
				Posted: Sat Apr 20, 2013 1:17 pm
				by oskari
				I haven't seen this before, but maybe it's a buzz bug.
			 
			
					
				Re: Prevent unwanted click on GUI?
				Posted: Sat Apr 20, 2013 3:11 pm
				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! 

 
			 
			
					
				Re: Prevent unwanted click on GUI?
				Posted: Sat Apr 20, 2013 4:14 pm
				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! 

 
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.
 
			 
			
					
				Re: Prevent unwanted click on GUI?
				Posted: Sat Apr 20, 2013 5:03 pm
				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!