-
-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update kivy example #573
update kivy example #573
Conversation
Your code breaks features on Linux. Use conditional statements instead for Windows. Provide version information on Kivy, Python and CEF Python that you have tested with. |
The code should be working as before on Linux. |
What if you add such code for Mac. if sys.platform == 'darwin':
# On MacOS, the NSApplication created in the cefpython initialization
# will be hidden if windowless is specified. In order for SDL to receive
# propper input events and for the application to show up in the
# command-tab list, the application must be made "regular".
AppKit.NSApplication.sharedApplication().setActivationPolicy_(
AppKit.NSApplicationActivationPolicyRegular) Does it resolve keyboard issue? It's from the pysdl2.py example. See also usage of MACOS_TRANSLATION_TABLE and get_native_key() in that example. |
You don't use GTK APIs on Mac, so no need to import Gtk for that OS. Just keep the single if import for Linux. |
The code from pysdl2.py doesn't help, while the pysdl2.py works with and without the code line. The issue with the kivy example is that the key is forwarded to cef only very rarely. So it is not completely impossible to type something, however it gets only about every 20th to 30th key event. If I remove the import Gtk, the example is crashing with exit code 132 (interrupted by signal 4: SIGILL). |
On Mac try setting the external_message_pump option to True. See: cefpython/src/linux/binaries_64bit/kivy_.py Line 163 in 0e85431
|
For MacOS the keyboard is also working now |
The external_message_pump option should be set only for Mac. It's buggy on other OSes. |
Ok, it is activated now only for MacOS |
@hoba87, I tried your version and I getting following error. Could you please help me fix this?
|
I've updated the kivy example to be working for me on Windows 10. I have removed the pygtk depedency, because it seems to be not necessary (at least for me on Win10).