[webkit-changes] [WebKit/WebKit] fe2a6a: Modifier keys and mouse events sent to backgrounde...

Richard Robinson noreply at github.com
Thu May 30 18:59:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fe2a6a572c960334e5bd9af22bf151a91e0ad36e
      https://github.com/WebKit/WebKit/commit/fe2a6a572c960334e5bd9af22bf151a91e0ad36e
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2024-05-30 (Thu, 30 May 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
    M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm

  Log Message:
  -----------
  Modifier keys and mouse events sent to backgrounded Safari window
https://bugs.webkit.org/show_bug.cgi?id=274877
rdar://115430109

Reviewed by Simon Fraser.

Currently, the event monitor which dispatches mouse events on modifier key presses gets installed when added
to a window, and removed when removed from a window. However, this results in the monitor still existing for
backgrounded windows.

Fix by creating a new tracking area and ensuring that the monitor is only active while the mouse is within
the tracking area of the window.

* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::secondaryTrackingAreaOptions):
(WebKit::m_flagsChangedEventMonitorTrackingArea):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::mouseEntered):
(WebKit::WebViewImpl::mouseExited):
(WebKit::m_primaryTrackingArea): Deleted.

Canonical link: https://commits.webkit.org/279557@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list