Module: wine
Branch: master
Commit: 421b3ca3eb16a3ca254b615f6c7dfc1619c973e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=421b3ca3eb16a3ca254b615f6…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru>
Date: Fri Oct 23 18:32:22 2015 +0800
ole32: Fallback to parsing the Presentation streams ff parsing of the "CONTENTS" stream fails.
I have an application that tries to load an existing object from the file
using OleLoad() and fails because the "CONTENTS" stream has clsid set to
"Microsoft Photo Editor 3.0 Picture". I've dumped the contents of the OLE
storage to disk for investigation, and under Windows (where Microsoft Photo
Editor is not installed, and registry has no traces of its class guids)
OleLoad() is able to load objects from this storage, and after that OleDraw()
successfully paints the object contents on the screen. I've written an
application to play with the dumped storage, and under Windows the "CONTENTS"
stream also can't be loaded, but the storage also contains the "OlePres000"
stream which contains an object in CF_METAFILEPICT format, and this one can be
loaded and painted.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/ole32/datacache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index caabd10..9284410 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -1368,7 +1368,8 @@ static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg )
hr = parse_contents_stream( This, pStg, stm );
IStream_Release( stm );
}
- else
+
+ if (FAILED(hr))
hr = parse_pres_streams( This, pStg );
if (SUCCEEDED( hr ))
Module: wine
Branch: master
Commit: 9d6a14305a42b1595344429ac04d5122bc1cab5b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d6a14305a42b1595344429ac…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Wed Oct 28 17:01:54 2015 -0500
winemac: Add another workaround for bad side effects of CGWarpMouseCursorPosition().
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/cocoa_app.m | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 8e1f318..7f6ca23 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -1307,20 +1307,27 @@ int macdrv_err_on;
}
else
{
+ // Annoyingly, CGWarpMouseCursorPosition() effectively disassociates
+ // the mouse from the cursor position for 0.25 seconds. This means
+ // that mouse movement during that interval doesn't move the cursor
+ // and events carry a constant location (the warped-to position)
+ // even though they have delta values. For apps which warp the
+ // cursor frequently (like after every mouse move), this makes
+ // cursor movement horribly laggy and jerky, as only a fraction of
+ // mouse move events have any effect.
+ //
+ // On some versions of OS X, it's sufficient to forcibly reassociate
+ // the mouse and cursor position. On others, it's necessary to set
+ // the local events suppression interval to 0 for the warp. That's
+ // deprecated, but I'm not aware of any other way. For good
+ // measure, we do both.
+ CGSetLocalEventsSuppressionInterval(0);
ret = (CGWarpMouseCursorPosition(pos) == kCGErrorSuccess);
+ CGSetLocalEventsSuppressionInterval(0.25);
if (ret)
{
lastSetCursorPositionTime = [[NSProcessInfo processInfo] systemUptime];
- // Annoyingly, CGWarpMouseCursorPosition() effectively disassociates
- // the mouse from the cursor position for 0.25 seconds. This means
- // that mouse movement during that interval doesn't move the cursor
- // and events carry a constant location (the warped-to position)
- // even though they have delta values. This screws us up because
- // the accumulated deltas we send to Wine don't match any eventual
- // absolute position we send (like with a button press). We can
- // work around this by simply forcibly reassociating the mouse and
- // cursor position.
CGAssociateMouseAndMouseCursorPosition(true);
}
}