Expected Behavior
motor-expert-screen should finish executing and move the screen to the cursor irrespective of the type of motor
Current Behavior
For certain types of motors including but not limited to pulsepickers, aerotechs, and smaracts, the variabel title will not match the actual title of the screen opened, resulting in xdotool search --sync hanging forever, the screen never being aligned to the cursor, and motor-expert-screen never completing.
Possible Solution
I think the way title is set should be changed. Instead of having on if-elif-else block to set the title, and another to open the screen, we should only have one block where we set the title variable and another variable containing the command that will open the screen. At the end of the block, xdotool search for old windows, then execute the command. This will make it easier to make sure each different type of screen correctly sets the title variable.
Steps to Reproduce (for bugs)
- Run motor-expert-screen with a pv for a pulsepicker, aerotech, or smaract motor (XPP:SB2:MMS:29, XCS:SND:T1:Y1, or XPP:MCS2:01:m1 respectively)
- Observe that motor-expert-screen never finishes executing, it just stays in the foreground until you manually terminate it, and that the screen is never moved to your mouse by xdotool.
Context
I noticed it while working on #233. I also feel like I've noticed this before but never paid it much attention.
Your Environment
Expected Behavior
motor-expert-screen should finish executing and move the screen to the cursor irrespective of the type of motor
Current Behavior
For certain types of motors including but not limited to pulsepickers, aerotechs, and smaracts, the variabel title will not match the actual title of the screen opened, resulting in xdotool search --sync hanging forever, the screen never being aligned to the cursor, and motor-expert-screen never completing.
Possible Solution
I think the way title is set should be changed. Instead of having on if-elif-else block to set the title, and another to open the screen, we should only have one block where we set the title variable and another variable containing the command that will open the screen. At the end of the block, xdotool search for old windows, then execute the command. This will make it easier to make sure each different type of screen correctly sets the title variable.
Steps to Reproduce (for bugs)
Context
I noticed it while working on #233. I also feel like I've noticed this before but never paid it much attention.
Your Environment