diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-04-15 16:13:01 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-04-15 20:34:31 +0200 |
commit | 22c250e32495284a03cbdf1799c8af59a46d2bd3 (patch) | |
tree | f01eb459c6ddf7f238350f4e557857de5641a8ed /gdk/broadway | |
parent | 0098344f84cedb6347fc99691f6e3d358ec112e7 (diff) | |
download | gtk+-22c250e32495284a03cbdf1799c8af59a46d2bd3.tar.gz |
[broadway] Correctly handle ungrabs in the browser side
Always call doUngrab to get the right event, and always do this
if the grabbed window is hidden or destroyed.
Diffstat (limited to 'gdk/broadway')
-rw-r--r-- | gdk/broadway/broadway.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js index e8e2ea444e..d6fb43d366 100644 --- a/gdk/broadway/broadway.js +++ b/gdk/broadway/broadway.js @@ -560,6 +560,9 @@ function cmdShowSurface(id) function cmdHideSurface(id) { + if (grab.window == id) + doUngrab(); + var surface = surfaces[id]; if (!surface.visible) @@ -627,6 +630,9 @@ function moveToTop(surface) { function cmdDeleteSurface(id) { + if (grab.window == id) + doUngrab(); + var surface = surfaces[id]; var i = stackingOrder.indexOf(surface); if (i >= 0) @@ -714,8 +720,8 @@ function cmdGrabPointer(id, ownerEvents) function cmdUngrabPointer() { sendInput ("u", []); - - grab.window = null; + if (grab.window) + doUngrab(); } function handleCommands(cmdObj) @@ -1100,7 +1106,7 @@ function onMouseUp (ev) { sendInput ("B", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]); if (grab.window != null && grab.implicit) - doUngrab(ev.timeStamp); + doUngrab(); } /* Some of the keyboard handling code is from noVNC and |