Skip to content

The popup window and parent window can't script each other in the wxpython.py example #171

Description

@GoogleCodeExporter
The keyboard problems in popup windows in wxPython (Issue 80) were fixed by 
implementing LifespanHandler.OnBeforePopup. The creation of popup window by CEF 
is cancelled and popup browser is created on our own. The implication of this 
is that the popup window and parent window can't script each other. The 
"window.opener" is not available in the popup browser.

I think we might be able to fix this by modifying the OnBeforePopup 
implementation to this:

1. Create wx.Frame, but do not embed browser in it
2. Use the windowInfo argument to call windowInfo.SetAsChild with the wx.Frame 
handle

This way we take care of creating the window itself, by leave teh embedding of 
the browser to CEF. I think this could fix the popup<>parent scripting issues.

However, OnBeforePopup runs on the IO thread and wx.Frame window creation must 
run on the UI thread. So it must wait in the OnBeforePopup until the window is 
created. How can to accomplish that? How to pause the execution on the IO 
thread and return window handle back from the the UI thread to the IO thread?

Original issue reported on code.google.com by czarek.t...@gmail.com on 23 Jan 2015 at 11:41

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions