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

Problem of mouse over in Mac with PySide Widget #185

Open
kocrotus opened this issue Oct 29, 2015 · 2 comments
Open

Problem of mouse over in Mac with PySide Widget #185

kocrotus opened this issue Oct 29, 2015 · 2 comments

Comments

@kocrotus
Copy link

The mouse hover event in cefpython can not be performed using the PySide UI Widget . All JS script related to mouse over is not working .

The detail :

  • Mac OS 10.10 Yosemite
  • cefpython binaries : 31.2 from cefpython build

Reference topic : https://groups.google.com/forum/#!topic/cefpython/_KIwD9dtZLE

Seems that the mouse over only triggered once when the mouse get out from the cefpython into the black border and return .

The wxpython widget works just fine with the mouse over.

@cztomczak
Copy link
Owner

cztomczak commented Mar 4, 2017

I can reproduce it in v56.0 release on Mac using qt4.py example running PySide. MacOS 10.9 Mavericks. I only tested with PySide, I couldn't get PyQt4 installed on Mac, homebrew moved it to boneyard.

Looks like mouse move events are eaten by Qt and never sent to CEF. I think this could be dirty fixed by calling Browser.SendMouseMoveEvent from Qt mouse move event.

Update: Pull requests with that fix are welcome. It needs to be checked whether this bug needs to be fixed in just PySide or in both PyQt and PySide and code needs to apply appropriately.

@cztomczak
Copy link
Owner

This needs to be retested with v66+.

Maybe related. There was a report of an issue with mouse movements not being captured on Mac in the pysdl2 example. Fix provided via PR #544. Code in question:

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)

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

No branches or pull requests

2 participants