https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5418f394ab22b376f29a0…
commit 5418f394ab22b376f29a03f3c82924ff28055f5d
Author: jimtabor <james.tabor(a)reactos.org>
AuthorDate: Sat May 11 11:22:06 2019 -0500
Commit: jimtabor <james.tabor(a)reactos.org>
CommitDate: Sat May 11 11:22:06 2019 -0500
[Gdi32] Batch Type Select Mode for Testing
Do not allow setting hdc if no batch type is found.
See CORE-15988.
---
win32ss/gdi/gdi32/include/gdi32p.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/win32ss/gdi/gdi32/include/gdi32p.h b/win32ss/gdi/gdi32/include/gdi32p.h
index c054bf1fcc..c979ee9eee 100644
--- a/win32ss/gdi/gdi32/include/gdi32p.h
+++ b/win32ss/gdi/gdi32/include/gdi32p.h
@@ -392,16 +392,6 @@ GdiAllocBatchCommand(
/* Check if we have a valid environment */
if (!pTeb || !pTeb->Win32ThreadInfo) return NULL;
- /* Do we use a DC? */
- if (hdc)
- {
- /* If the batch DC is NULL, we set this one as the new one */
- if (!pTeb->GdiTebBatch.HDC) pTeb->GdiTebBatch.HDC = hdc;
-
- /* If not, check if the batch DC equal to our DC */
- else if (pTeb->GdiTebBatch.HDC != hdc) return NULL;
- }
-
/* Get the size of the entry */
if (Cmd == GdiBCPatBlt) cjSize = sizeof(GDIBSPATBLT);
else if (Cmd == GdiBCPolyPatBlt) cjSize = sizeof(GDIBSPPATBLT);
@@ -417,6 +407,16 @@ GdiAllocBatchCommand(
/* Unsupported operation */
if (cjSize == 0) return NULL;
+ /* Do we use a DC? */
+ if (hdc)
+ {
+ /* If the batch DC is NULL, we set this one as the new one */
+ if (!pTeb->GdiTebBatch.HDC) pTeb->GdiTebBatch.HDC = hdc;
+
+ /* If not, check if the batch DC equal to our DC */
+ else if (pTeb->GdiTebBatch.HDC != hdc) return NULL;
+ }
+
/* Check if the buffer is full */
if ((pTeb->GdiBatchCount >= GDI_BatchLimit) ||
((pTeb->GdiTebBatch.Offset + cjSize) > GDIBATCHBUFSIZE))
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d5a230810640deac812c…
commit 2d5a230810640deac812c37336a583c8ac266281
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Fri May 10 08:39:10 2019 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Fri May 10 11:35:01 2019 +0200
[MOUHID] Correctly detect tablet devices
Some mice give a logical min/logical max which is the maximum move
that they can provide. Those were wrongly detected as absolute mice,
and mouse pointer was mostly stuck at the upper left corner of the
screen.
---
drivers/hid/mouhid/mouhid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/mouhid/mouhid.c b/drivers/hid/mouhid/mouhid.c
index 045090929d..073b22c303 100644
--- a/drivers/hid/mouhid/mouhid.c
+++ b/drivers/hid/mouhid/mouhid.c
@@ -947,8 +947,8 @@ MouHid_StartDevice(
}
/* check if mice is absolute */
- if (DeviceExtension->ValueCapsY.LogicalMax > DeviceExtension->ValueCapsY.LogicalMin ||
- DeviceExtension->ValueCapsX.LogicalMax > DeviceExtension->ValueCapsX.LogicalMin)
+ if (DeviceExtension->ValueCapsY.IsAbsolute &&
+ DeviceExtension->ValueCapsX.IsAbsolute)
{
/* mice is absolute */
DeviceExtension->MouseAbsolute = TRUE;