chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
629 stars 138 forks source link

MouseListener issue with Linux #418

Open magreenblatt opened 2 years ago

magreenblatt commented 2 years ago

Original report by SC (Bitbucket: SC, GitHub: SC).


Hi,

i’m using JCEF with Maven. When i set:

browser_.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {

        logger.writeLogs("MainFrame", "Touch (coord X: " + e.getX() + " | X: " + e.getY() + ")");
        lastInteraction = System.currentTimeMillis();

    }

});

In Windows X64 no problem. Same in MacOS M1 arm. (so logger obj write touch event over page)

In linux (Raspbian OS x64) the touch isn’t logged so i cannot set the lastInteraction time.

Did you think it could be resolved?

Thank you.

magreenblatt commented 2 years ago

How does it behave on other Linux distros, like Ubuntu?

magreenblatt commented 2 years ago

Original comment by SC (Bitbucket: SC, GitHub: SC).


@{557058:d5b3cc39-23d7-4a44-8191-0699b8f3b6ed} Also with Ubuntu same issue.

The JDK is OpenJDK 11.

magreenblatt commented 2 years ago

Original comment by SC (Bitbucket: SC, GitHub: SC).


Update: if i use osrMode = true the click or mouse movements are correctly intercepted.

But why in windows or mac os this is not required and what happens using osr mode?

Thank you all

magreenblatt commented 2 years ago

There is some platform-specific logic related to handling mouse events on other platforms. See here for Windows and here for Mac.