mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 481517: While panning, mouse out of desktop window doesn't stop, r=mfinkle
This commit is contained in:
parent
d9e6a31504
commit
86d5592a4e
@ -76,11 +76,14 @@ function getScrollboxFromElement(elem) {
|
||||
*/
|
||||
|
||||
function InputHandler() {
|
||||
/* used to stop everything if mouse leaves window on desktop */
|
||||
window.addEventListener("mouseout", this, true);
|
||||
|
||||
let stack = document.getElementById("browser-container");
|
||||
stack.addEventListener("DOMMouseScroll", this, true);
|
||||
|
||||
/* these handle dragging of both chrome elements and content */
|
||||
stack.addEventListener("mouseout", this, true);
|
||||
//stack.addEventListener("mouseout", this, true);
|
||||
stack.addEventListener("mousedown", this, true);
|
||||
stack.addEventListener("mouseup", this, true);
|
||||
stack.addEventListener("mousemove", this, true);
|
||||
@ -117,8 +120,6 @@ InputHandler.prototype = {
|
||||
|
||||
ungrab: function ungrab(obj) {
|
||||
this._grabbed = null;
|
||||
// only send events to this object
|
||||
// call cancel on all modules
|
||||
},
|
||||
|
||||
startListening: function startListening() {
|
||||
@ -133,6 +134,15 @@ InputHandler.prototype = {
|
||||
if (this._ignoreEvents)
|
||||
return;
|
||||
|
||||
// relatedTarget should only be NULL if we move out of window
|
||||
// if so, ungrab and reset everything. We don't always get
|
||||
// mouseout events if the mouse movement causes other window
|
||||
// activity, but this catches many of the cases
|
||||
if (aEvent.type == "mouseout" && !aEvent.relatedTarget) {
|
||||
this.grab(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._grabbed) {
|
||||
this._grabbed.handleEvent(aEvent);
|
||||
}
|
||||
@ -708,9 +718,6 @@ ContentClickingModule.prototype = {
|
||||
this._sendDoubleClick();
|
||||
}
|
||||
break;
|
||||
case "mouseout":
|
||||
this._reset();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user