[go: nahoru, domu]

Skip to content

Commit

Permalink
Update drag button at right time
Browse files Browse the repository at this point in the history
It needs to update whenever the viewport or clipping changes, so
let's make sure that actually happens and not trigger on mildly
related events.
  • Loading branch information
samhed committed Feb 16, 2017
1 parent 6bfd9dc commit b56772e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ var UI;
addResizeHandlers: function() {
window.addEventListener('resize', UI.applyResizeMode);
window.addEventListener('resize', UI.updateViewClip);
window.addEventListener('resize', UI.updateViewDrag);
},

addControlbarHandlers: function() {
Expand Down Expand Up @@ -1313,6 +1312,10 @@ var UI;
// the size of the browser window.
display.viewportChangeSize(size.w, size.h);
}

// Changing the viewport may change the state of
// the dragging button
UI.updateViewDrag();
},

// Handle special cases where clipping is forced on/off or locked
Expand Down Expand Up @@ -1664,7 +1667,6 @@ var UI;

updateSessionSize: function(rfb, width, height) {
UI.updateViewClip();
UI.updateViewDrag();
},

updateDesktopName: function(rfb, name) {
Expand Down

0 comments on commit b56772e

Please sign in to comment.