The problem I have is that I cannot write inside the text controls in the wx frame as the events are grabbed by panda.
I thought about disabling input detection when the mouse goes outside the panda window and reenabling it when the mouse re-enter, so I’ve written a task that checks if the mouse watcher node has the mouse. That works, but I still cannot properly disable input detection.
I tried using ignoreAll and using the ButtonThrower methods clearThrowButtons and removeThrowButtons, but I still can’t write inside the text controls (which are editable).
Anybody has an idea how to “shift” the input detection to wx ?
I don’t see how whether you have called accept() on a button event has anything to do with whether wx gets to process the event or not. Panda doesn’t have the ability to “steal” events from any other window. This is really up to the operating system: Panda will process all of the button events that get delivered to the Panda window, while wx will process all of the button events that get delivered to the wx window.
If the operating system is sending button events to the wrong window, that’s more a question of specifying the right keyboard focus to the operating system. Which OS are you running on?
I made a small example to better explain the problem.
The example has a wx frame with a panda window embedded inside and a text ctrl.
What I don’t understand is why I can’t edit inside the text box. I’m pretty new also to wx so maybe I’m missing something obvious, anyway here it is…
I’m using Ubuntu Gnome and 8.10.
I just discovered that if I alt+tab to switch to another app and then I alt+tab again I’m able to edit the box. That’s weird…