Attempt to prevent key pass through in wayland. Hopefully also improve web browsing speed.

This commit is contained in:
Storm Dragon
2026-04-07 15:39:49 -04:00
parent e72cc79c6a
commit d51ef2ad69
2 changed files with 113 additions and 1 deletions
+11 -1
View File
@@ -1632,6 +1632,17 @@ class Script(default.Script):
self._inFocusMode = False
self._setNavigationSuspended(True, "focus left document content")
debug.printMessage(debug.LEVEL_INFO, msg, True)
oldDocument = self.utilities.getTopLevelDocumentForObject(oldFocus)
if not oldDocument and self.utilities.isDocument(oldFocus):
oldDocument = oldFocus
if oldFocus and not oldDocument:
msg = "WEB: Not refreshing grabs because we weren't in a document before"
debug.printMessage(debug.LEVEL_INFO, msg, True)
return False
tokens = ["WEB: Refreshing grabs because we left document", oldDocument]
debug.printTokens(debug.LEVEL_INFO, tokens, True)
self.refreshKeyGrabs()
return False
@@ -2923,7 +2934,6 @@ class Script(default.Script):
self._lastCommandWasStructNav = False
self._lastCommandWasMouseButton = False
self._lastMouseButtonContext = None, -1
self.removeKeyGrabs()
return False
def getTransferableAttributes(self):