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).
Note: Following answer has been tested in Ubuntu 18.04 LTS
Not sure if this is the exact answer to your question, since you are calling Onboard with code, but I found the configuration at the following link to work for me with making Onboard show over top of full-screen applications.
https://bugs.launchpad.net/onboard/+bug/1722271
Specifically this section:
I've tested this with both Firefox and a program of my own, and with both apps Onboard will show over top of the apps when they are full-screen.