Skip to content
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

Keyboard problems in popup windows in the wxpython examples (Windows) #80

Closed
GoogleCodeExporter opened this issue Aug 28, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

There was a similar keys "chars" events problem when embedding browser
in wx tabs, this was fixed by adding the wx.WANTS_CHARS style to panel
and notebook controls. See this topic on the CEF Forum:

http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10922

Adding the wx.WANTS_CHARS style to wx.Frame does not solve the problem
for popup windows. This probably needs a more complex fix, requiring
to hook up to wx keyboard events and propagate them to the CEF child 
windows.

Original issue reported on code.google.com by czarek.t...@gmail.com on 7 Aug 2013 at 4:47

@GoogleCodeExporter
Copy link
Author

Setting style for wx.Frame:

    style=(wx.DEFAULT_FRAME_STYLE | wx.WANTS_CHARS)

Original comment by czarek.t...@gmail.com on 7 Aug 2013 at 4:55

@GoogleCodeExporter
Copy link
Author

See these links:

"Catching key events globally"
http://wiki.wxwidgets.org/Catching_key_events_globally

EVT_CHAR_HOOK
http://stackoverflow.com/questions/3876966/what-does-wxwidgets-evt-char-hook-do

"Unreliable keyboard events with wx.Frame"
http://comp.soft-sys.wxwindows.narkive.com/H0ymFpRo/unreliable-keyboard-events-w
ith-wxframe

Original comment by czarek.t...@gmail.com on 7 Aug 2013 at 5:38

@GoogleCodeExporter
Copy link
Author

I think that the solution is to create the popup windows explicitilly, by 
implenting the LifespanHandler.`OnBeforePopup` callback. Keyboard behaves 
correctly in the wxpython.py popup example when using the NewWindow() function.

Original comment by czarek.t...@gmail.com on 21 May 2014 at 7:34

@GoogleCodeExporter
Copy link
Author

Thanks, implenting the LifespanHandler.`OnBeforePopup` callback helped.
However this is not a straightforward solution as you can't create new window 
directly in this callback (as it is executed in wrong thread).

Original comment by mathemat...@gmail.com on 22 May 2014 at 2:21

@GoogleCodeExporter
Copy link
Author

Issue 61 is to allow posting tasks on the UI thread.

Original comment by czarek.t...@gmail.com on 22 May 2014 at 2:31

@GoogleCodeExporter
Copy link
Author

Original comment by czarek.t...@gmail.com on 22 May 2014 at 2:33

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Fixed in revision a07c898cb1df.

Exposed cefpython.`PostTask` function for execution of tasks on various 
threads. See example usage:
https://code.google.com/p/cefpython/source/browse/cefpython/cef3/windows/binarie
s/wxpython.py?r=a07c898cb1df#607

Original comment by czarek.t...@gmail.com on 9 Aug 2014 at 4:18

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Note that are implications of creating the popup window of our own by 
implementing LifespanHandler.OnBeforePopup. The popup window and parent window 
will not be able to script each other. There will be no "window.opener" 
property available in the popup window.

Original comment by czarek.t...@gmail.com on 22 Jan 2015 at 5:00

@GoogleCodeExporter
Copy link
Author

The popup/parent scripting issues are to be fixed in a separate Issue 171.

Original comment by czarek.t...@gmail.com on 23 Jan 2015 at 11:42

@GoogleCodeExporter
Copy link
Author

Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/80

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant