Commit e9653596 authored by tomernic's avatar tomernic
Browse files

Reviewed by Maciej.

        <rdar://problem/4404652> Netscape plug-in mouse events broken in HiDPI

        Multiply global mouse coordinates by the window scale factor so that plug-ins can use GlobalToLocal() in HiDPI.
        This fixes many bugs involving plug-in mouse event handling in HiDPI.  Most notably, the Flash player will now
        correctly respond to clicks.

        * Plugins/WebBaseNetscapePluginView.m:
        (+[WebBaseNetscapePluginView getCarbonEvent:]):
        (-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f3be6b4
2006-07-09 Tim Omernick <timo@apple.com>
Reviewed by Maciej.
<rdar://problem/4404652> Netscape plug-in mouse events broken in HiDPI
Multiply global mouse coordinates by the window scale factor so that plug-ins can use GlobalToLocal() in HiDPI.
This fixes many bugs involving plug-in mouse event handling in HiDPI. Most notably, the Flash player will now
correctly respond to clicks.
* Plugins/WebBaseNetscapePluginView.m:
(+[WebBaseNetscapePluginView getCarbonEvent:]):
(-[WebBaseNetscapePluginView getCarbonEvent:withEvent:]):
2006-07-09 Darin Adler <darin@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -150,6 +150,8 @@ + (void)getCarbonEvent:(EventRecord *)carbonEvent
carbonEvent->message = 0;
carbonEvent->when = TickCount();
GetGlobalMouse(&carbonEvent->where);
carbonEvent->where.h *= HIGetScaleFactor();
carbonEvent->where.v *= HIGetScaleFactor();
carbonEvent->modifiers = GetCurrentKeyModifiers();
if (!Button())
carbonEvent->modifiers |= btnState;
......@@ -192,6 +194,8 @@ - (EventModifiers)modifiersForEvent:(NSEvent *)event
- (void)getCarbonEvent:(EventRecord *)carbonEvent withEvent:(NSEvent *)cocoaEvent
{
if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent)) {
carbonEvent->where.h *= HIGetScaleFactor();
carbonEvent->where.v *= HIGetScaleFactor();
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment