aboutsummaryrefslogtreecommitdiff
path: root/lib/libvgl/bitmap.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2019-04-24 15:35:29 +0000
committerBruce Evans <bde@FreeBSD.org>2019-04-24 15:35:29 +0000
commitc7432537b1a67e964ed1d7b35977049301dc9189 (patch)
tree298224740b9aa75056abc98113170520e745ad0b /lib/libvgl/bitmap.c
parentef5a75b1939b6a7437ca392147dbaba8c89b0ceb (diff)
Notes
Diffstat (limited to 'lib/libvgl/bitmap.c')
-rw-r--r--lib/libvgl/bitmap.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/libvgl/bitmap.c b/lib/libvgl/bitmap.c
index 17896a595d85..bea1e1db23e2 100644
--- a/lib/libvgl/bitmap.c
+++ b/lib/libvgl/bitmap.c
@@ -214,23 +214,36 @@ int
VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
VGLBitmap *dst, int dstx, int dsty, int width, int hight)
{
- int error;
+ int error, mouseoverlap;
if (src == VGLDisplay)
src = &VGLVDisplay;
if (src->Type != MEMBUF)
return -1; /* invalid */
if (dst == VGLDisplay) {
- VGLMouseFreeze(dstx, dsty, width, hight, 0);
- __VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty, width, hight);
+ VGLMouseFreeze();
+ mouseoverlap = VGLMouseOverlap(dstx, dsty, width, hight);
+ if (mouseoverlap)
+ VGLMousePointerHide();
+ error = __VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty,
+ width, hight);
+ if (error != 0) {
+ if (mouseoverlap)
+ VGLMousePointerShow();
+ VGLMouseUnFreeze();
+ return error;
+ }
src = &VGLVDisplay;
srcx = dstx;
srcy = dsty;
} else if (dst->Type != MEMBUF)
return -1; /* invalid */
error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, hight);
- if (dst == VGLDisplay)
+ if (dst == VGLDisplay) {
+ if (mouseoverlap)
+ VGLMousePointerShow();
VGLMouseUnFreeze();
+ }
return error;
}