Changeset 49921 in webkit
- Timestamp:
- Oct 21, 2009 1:47:21 PM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r49915 r49921 1 2009-10-21 Alejandro G. Castro <alex@igalia.com> 2 3 Reviewed by Gustavo Noronha. 4 5 [GTK] Added conditional code to avoid using 6 gdk_window_get_root_coords if we do not have a gtk+ release newer 7 than 2.17.3. 8 https://bugs.webkit.org/show_bug.cgi?id=30636 9 10 * WebKitTools/DumpRenderTree/gtk/EventSender.cpp: 11 1 12 2009-10-21 Shu Chang <Chang.Shu@nokia.com> 2 13 -
trunk/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
r49913 r49921 130 130 } 131 131 132 #if !GTK_CHECK_VERSION(2,17,3) 133 static void getRootCoords(GtkWidget* view, int* rootX, int* rootY) 134 { 135 GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view)); 136 int tmpX, tmpY; 137 138 gtk_widget_translate_coordinates(view, window, lastMousePositionX, lastMousePositionY, &tmpX, &tmpY); 139 140 gdk_window_get_origin(window->window, rootX, rootY); 141 142 *rootX += tmpX; 143 *rootY += tmpY; 144 } 145 #endif 146 132 147 static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 133 148 { … … 157 172 158 173 int x_root, y_root; 174 #if GTK_CHECK_VERSION(2,17,3) 159 175 gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &x_root, &y_root); 176 #else 177 getRootCoords(GTK_WIDGET(view), &x_root, &y_root); 178 #endif 160 179 161 180 event.button.x_root = x_root; … … 210 229 211 230 int x_root, y_root; 231 #if GTK_CHECK_VERSION(2,17,3) 212 232 gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &x_root, &y_root); 233 #else 234 getRootCoords(GTK_WIDGET(view), &x_root, &y_root); 235 #endif 213 236 214 237 event.button.x_root = x_root; … … 256 279 257 280 int x_root, y_root; 281 #if GTK_CHECK_VERSION(2,17,3) 258 282 gdk_window_get_root_coords(GTK_WIDGET(view)->window, lastMousePositionX, lastMousePositionY, &x_root, &y_root); 283 #else 284 getRootCoords(GTK_WIDGET(view), &x_root, &y_root); 285 #endif 259 286 260 287 event.motion.x_root = x_root;
Note: See TracChangeset
for help on using the changeset viewer.