Dear PTB community,
I am having trouble with the GetMouse function. This should return an argument called 'focus' that is 1 if the mouse cursor is over a specified screen or PTB window, and 0 otherwise. However, no matter what screen or window id I provide, focus is always zero.
I am using Ubuntu 14.04, Matlab R2015a, and PsychToolbox 3.0.14 on a system with two separate monitors such that Screen ( 'Screens' ) returns 0 and 1 ; note, X11 creates two xscreens and assigns one to each physical monitor. I have run PsychLinux. Opening and drawing to screen 1 works without issue. However, the following code fails to raise the focus flag:
WaitSecs ( 0.1 ) ;
while ~ KbCheck
[ x , y , ~ , focus ] = GetMouse ( 1 ) ;
fprintf ( 'focus %d , x %0.2f , y %0.2f\n' , focus , x , y )
end
Is there anything else I can do to identify which screen the mouse cursor is in?
Best wishes,
Jackson
I am having trouble with the GetMouse function. This should return an argument called 'focus' that is 1 if the mouse cursor is over a specified screen or PTB window, and 0 otherwise. However, no matter what screen or window id I provide, focus is always zero.
I am using Ubuntu 14.04, Matlab R2015a, and PsychToolbox 3.0.14 on a system with two separate monitors such that Screen ( 'Screens' ) returns 0 and 1 ; note, X11 creates two xscreens and assigns one to each physical monitor. I have run PsychLinux. Opening and drawing to screen 1 works without issue. However, the following code fails to raise the focus flag:
WaitSecs ( 0.1 ) ;
while ~ KbCheck
[ x , y , ~ , focus ] = GetMouse ( 1 ) ;
fprintf ( 'focus %d , x %0.2f , y %0.2f\n' , focus , x , y )
end
Is there anything else I can do to identify which screen the mouse cursor is in?
Best wishes,
Jackson