WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
273876
[GTK] Pointer lock not working on X11
https://bugs.webkit.org/show_bug.cgi?id=273876
Summary
[GTK] Pointer lock not working on X11
Roope Salmi
Reported
2024-05-08 07:24:06 PDT
Created
attachment 471315
[details]
Example HTML demonstrating the issue Ubuntu 22.04.4 WebKitGTK 2.44.0-0ubuntu0.22.04.1 When running under X11 (custom app or epiphany), this simple example using the pointer lock API <div>Drag</div> <script> let el = document.querySelector("div"); el.addEventListener("mousedown", () => { el.requestPointerLock(); }); window.addEventListener("pointerlockerror", () => console.log("error")); </script> fires the pointerlockerror event when trying to drag the text, and pointer locking doesn't work. The example works fine when running under Wayland.
Attachments
Example HTML demonstrating the issue
(226 bytes, text/html)
2024-05-08 07:24 PDT
,
Roope Salmi
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Roope Salmi
Comment 1
2024-05-27 08:41:46 PDT
Similar bug for WKWebView:
https://bugs.webkit.org/show_bug.cgi?id=244648
Roope Salmi
Comment 2
2024-06-05 02:12:34 PDT
Can reproduce on a local build of 2.45.2 with or without USE_GTK4. In debug mode, crashes on an assert: ASSERTION FAILED: !m_device /app/webkit/Source/WebKit/UIProcess/gtk/PointerLockManager.cpp(74) : virtual WebKit::PointerLockManager::~PointerLockManager() 1 0x726cf481ce62 WTFCrash 2 0x726cff040cdc WTF::isIntegralOrPointerType() 3 0x726d00536826 WebKit::PointerLockManager::~PointerLockManager() 4 0x726d00536ff0 WebKit::PointerLockManagerX11::~PointerLockManagerX11() 5 0x726d0053700c WebKit::PointerLockManagerX11::~PointerLockManagerX11() 6 0x726d003561ae std::default_delete<WebKit::PointerLockManager>::operator()(WebKit::PointerLockManager*) const 7 0x726d003581aa std::__uniq_ptr_impl<WebKit::PointerLockManager, std::default_delete<WebKit::PointerLockManager> >::reset(WebKit::PointerLockManager*) 8 0x726d00356e37 std::unique_ptr<WebKit::PointerLockManager, std::default_delete<WebKit::PointerLockManager> >::reset(WebKit::PointerLockManager*) 9 0x726d00354b5d std::unique_ptr<WebKit::PointerLockManager, std::default_delete<WebKit::PointerLockManager> >::operator=(decltype(nullptr)) 10 0x726d00352278 webkitWebViewBaseRequestPointerLock(_WebKitWebViewBase*) 11 0x726d002f9a37 webkitWebViewRequestPointerLock(_WebKitWebView*) 12 0x726d002a91cc webkitPointerLockPermissionRequestAllow 13 0x726d002a9342 webkitPointerLockPermissionRequestDispose 14 0x726cee9c2130 g_object_unref 15 0x726d002c9076 void WTF::derefGPtr<_WebKitPointerLockPermissionRequest>(_WebKitPointerLockPermissionRequest*) 16 0x726d002c8ad4 WTF::GRefPtr<_WebKitPointerLockPermissionRequest>::~GRefPtr() 17 0x726d002c82f6 UIClient::requestPointerLock(WebKit::WebPageProxy*) 18 0x726d00032aa2 WebKit::WebPageProxy::requestPointerLock() 19 0x726cff313dc7 auto IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}::operator()<>() const 20 0x726cff3543f6 void std::__invoke_impl<void, IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}>(std::__invoke_other, IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}&&) 21 0x726cff331811 std::__invoke_result<IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}>::type std::__invoke<IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}>(IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}&&) 22 0x726cff313dee decltype(auto) std::__apply_impl<IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}, std::tuple<>>(IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}&&, std::tuple<>&&, std::integer_sequence<unsigned long>) 23 0x726cff313e28 decltype(auto) std::apply<IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}, std::tuple<> >(IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&)::{lambda((auto:1&&)...)#1}&&, std::tuple<>&&) 24 0x726cff313e8d void IPC::callMemberFunction<WebKit::WebPageProxy, WebKit::WebPageProxy, void (), std::tuple<> >(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(), std::tuple<>&&) 25 0x726cff30be2c void IPC::handleMessage<Messages::WebPageProxy::RequestPointerLock, WebKit::WebPageProxy, WebKit::WebPageProxy, void ()>(IPC::Connection&, IPC::Decoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)()) 26 0x726cff2fe61d WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 27 0x726cffe49a12 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) 28 0x726cffedf1e8 WebKit::AuxiliaryProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&) 29 0x726d00155cb7 WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 30 0x726cffe1ef99 IPC::Connection::dispatchMessage(IPC::Decoder&) 31 0x726cffe1f1e8 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>)
Carlos Garcia Campos
Comment 3
2024-06-17 03:14:47 PDT
XGrabPointer is now AlreadyGrabbed, I don't know why
Carlos Garcia Campos
Comment 4
2024-06-17 03:15:02 PDT
Is now returning, I mean
Roope Salmi
Comment 5
2024-07-03 05:50:43 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/30437
EWS
Comment 6
2024-07-03 07:46:29 PDT
Committed
280623@main
(637888b2d2a3): <
https://commits.webkit.org/280623@main
> Reviewed commits have been landed. Closing PR #30437 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug