I need to open onboard keyboard over full screen browser (Chrome) from Python.
The python call is:
onscreen_keyboard = subprocess.Popen(['onboard', ])
os.system("wmctrl -a onboard -b above")
The python commands are called by button in html page that is opened in the browser.
Problem is, that it does not work always. Sometimes (especially after I switch to browser and go to fullscreen via F11 key) it does not open the kyboard. In this situation I need to exit the fullscreen (now the onboard appear!!! or probably was hidden there all the time). If I close the onboard and switch to fullscreen it works - I can call and close the onboard.
So the problematic scenario:
- I switch to browser, switch to fullscreen
- I call the onboard, it does NOT appear
- I exit the fullscreen, close the onboard and switch the fullscreen on again
- I call the onboard and it appears correctly. After I close it, I can call it again.
Why it does not work in the first time I switch to the browser from other window? How to fix it and make the onboard behavior consistent?
(note: the exactly same behavior I can see in Firefox, I test it on Ubuntu 18 and 16).