summary refs log tree commit diff
path: root/pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch')
-rw-r--r--pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch b/pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch
new file mode 100644
index 00000000000..3dbb6fd179f
--- /dev/null
+++ b/pkgs/tools/X11/xpra/0003-fix-pointer-limits.patch
@@ -0,0 +1,39 @@
+--- xf86-video-dummy-0.3.6/src/dummy_driver.c	2014-11-05 19:24:02.668656601 +0700
++++ xf86-video-dummy-0.3.6.new/src/dummy_driver.c	2014-11-05 19:37:53.076061853 +0700
+@@ -55,6 +55,9 @@
+ #include <X11/extensions/xf86dgaproto.h>
+ #endif
+ 
++/* Needed for fixing pointer limits on resize */
++#include "inputstr.h"
++
+ /* Mandatory functions */
+ static const OptionInfoRec *	DUMMYAvailableOptions(int chipid, int busid);
+ static void     DUMMYIdentify(int flags);
+@@ -713,6 +716,26 @@
+         RRTellChanged(pScrn->pScreen);
+     }
+ #endif
++    //ensure the screen dimensions are also updated:
++    pScrn->pScreen->width = mode->HDisplay;
++    pScrn->pScreen->height = mode->VDisplay;
++    pScrn->virtualX = mode->HDisplay;
++    pScrn->virtualY = mode->VDisplay;
++    pScrn->frameX1 = mode->HDisplay;
++    pScrn->frameY1 = mode->VDisplay;
++
++    //ensure the pointer uses the new limits too:
++    DeviceIntPtr pDev;
++    SpritePtr pSprite;
++    for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
++        if (pDev->spriteInfo!=NULL && pDev->spriteInfo->sprite!=NULL) {
++            pSprite = pDev->spriteInfo->sprite;
++            pSprite->hotLimits.x2 = mode->HDisplay;
++            pSprite->hotLimits.y2 = mode->VDisplay;
++            pSprite->physLimits.x2 = mode->HDisplay;
++            pSprite->physLimits.y2 = mode->VDisplay;
++        }
++    }
+     return TRUE;
+ }
+