- don't display mouse cursor outside of window

This commit is contained in:
Richard Alam 2010-10-07 13:38:03 -04:00
parent cd039d3a3e
commit b7bc30ab9b
2 changed files with 12 additions and 1 deletions

View File

@ -161,6 +161,10 @@
cursorImg.visible = true;
// DO NOT compute the x and y coordinate and assign directly to the cursorImg
// as it results in a flickering and jerky mouse pointer (ralam jun 10, 2010).
if (cursor.x < videoHolder.x) cursor.x = videoHolder.x;
if (cursor.y < videoHolder.y) cursor.y = videoHolder.y;
if (cursor.x > videoHolder.x + videoHolder.width) cursor.x = videoHolder.x + videoHolder.width;
if (cursor.y > videoHolder.y + videoHolder.height) cursor.y = videoHolder.y + videoHolder.height;
cursorImg.x = cursor.x;
cursorImg.y = cursor.y;
}

View File

@ -58,7 +58,10 @@
import org.bigbluebutton.modules.deskshare.events.ViewStreamEvent;
import org.bigbluebutton.modules.deskshare.events.ViewWindowEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var screenHeight:Number = Capabilities.screenResolutionY;
private var screenWidth:Number = Capabilities.screenResolutionX;
private var images:Images = new Images();
[Bindable] public var fitToWidthIcon:Class = images.magnifier;
[Bindable] public var fitToActualSizeIcon:Class = images.mag_reset;
@ -154,6 +157,10 @@
cursorImg.visible = true;
// DO NOT compute the x and y coordinate and assign directly to the cursorImg
// as it results in a flickering and jerky mouse pointer (ralam jun 10, 2010).
if (cursor.x < videoHolder.x) cursor.x = videoHolder.x;
if (cursor.y < videoHolder.y) cursor.y = videoHolder.y;
if (cursor.x > videoHolder.x + videoHolder.width) cursor.x = videoHolder.x + videoHolder.width;
if (cursor.y > videoHolder.y + videoHolder.height) cursor.y = videoHolder.y + videoHolder.height;
cursorImg.x = cursor.x;
cursorImg.y = cursor.y;
}