Skip to content

WebView on Linux when linking QtWebEngine: Some position related operation breaks after host window move. #535

Description

@HITOA

Hi, I noticed an issue with dpf's webview about window position.

Some position related operation like drag & drop, and opening the context menu of the webview, start to break after moving the window.
This is immediatelly fixed after a resize, which seems to update whatever value was cached by the webview that wasn't updated by simply moving the window. I took a screenshoot to hopefully make the issue more understandable, The red dot is the position of the mouse, I can't screenshot my own mouse with my current setup;

Image

Notice the offset between the mouse position when the right click was triggered and the position of the context menu. The offset between the two is exactly the offset between the current position and the last window position after resizing. The issue is the same with drag & drop. The rect for the drag zone is not updated correctly. which in my case is my main issue.

The fix seems to be about notifying the webview when the window position change. Calling webViewResize also seems to update whatever needed to be. I don't know if this bug happens on windows or mac, or even with Webkit GTK.

I'm on Linux, NixOS with wayland, The plugin should run with XWayland tho cause there doesn't seem to have any implementation of dpf webview for wayland anyway. the plugin is linking at runtime to QtWebEngine libQt6WebEngineWidgets.so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions