[Webkit-unassigned] [Bug 39240] [GTK] gtk_drag_begin should be initiated with a motion event
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 22 01:55:22 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=39240
Xan Lopez <xan.lopez at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #56273|review? |review-
Flag| |
--- Comment #2 from Xan Lopez <xan.lopez at gmail.com> 2010-05-22 01:55:22 PST ---
(From update of attachment 56273)
>diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
>index e166b52a5cd7016ad0bf34adb2a69e4144a6abb8..b619c550eb61166801b588cfe5ba84aed70d3542 100644
>--- a/WebKit/gtk/ChangeLog
>+++ b/WebKit/gtk/ChangeLog
>@@ -1,3 +1,18 @@
>+2010-05-17 Martin Robinson <mrobinson at igalia.com>
>+
>+ Reviewed by NOBODY (OOPS!).
>+
>+ [GTK] gtk_drag_begin should be initiated with a motion event
>+ https://bugs.webkit.org/show_bug.cgi?id=39240
>+
>+ * WebCoreSupport/DragClientGtk.cpp:
>+ (WebKit::DragClient::startDrag): Use a motion event to initiate the drag.
>+ * webkit/webkitprivate.cpp: Abstract this logic from webkitwebview.cpp into a helper method.
>+ (WebKit::clientPositionToRootWindowPosition): Added.
>+ * webkit/webkitprivate.h: Added declaration for WebKit::clientPositionToRootWindowPosition.
>+ * webkit/webkitwebview.cpp:
>+ (webkit_web_view_popup_menu_handler): Use the new helper method.
OK, now you *are* missing the explanation in the ChangeLog :)
>- GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
>- reinterpret_cast<GdkEventButton*>(event)->window = gtk_widget_get_window(GTK_WIDGET(m_webView));
>- reinterpret_cast<GdkEventButton*>(event)->time = GDK_CURRENT_TIME;
>+ GdkWindow* gdkWindow = gtk_widget_get_window(GTK_WIDGET(m_webView));
>+ IntPoint rootPosition(clientPositionToRootWindowPosition(gdkWindow, eventPos));
>+
>+ GdkEvent* event = gdk_event_new(GDK_MOTION_NOTIFY);
>+ event->motion.window = gdkWindow;
>+ event->motion.time = GDK_CURRENT_TIME;
>+ event->motion.x_root = rootPosition.x();
>+ event->motion.y_root = rootPosition.y();
>
Are you leaking the event and not adding a ref to the window? I remember some patch fixing this, so maybe I'm reviewing stuff in the wrong order, sigh.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list