Fix ExportFormatSpecification copy-c'tor
[ardour.git] / patches / GdkQuartzWindow.patch
1 --- old/gtk+-2.24.23/gdk/quartz/GdkQuartzWindow.c       2013-10-16 11:29:55.000000000 -0400
2 +++ new/gtk+-2.24.23/gdk/quartz/GdkQuartzWindow.c       2015-07-20 15:05:40.000000000 -0400
3 @@ -625,6 +625,41 @@
4    event.dnd.send_event = FALSE;
5    event.dnd.context = _gdk_quartz_drag_source_context;
6  
7 +  /* Check to see if the coordinates are inside a known GdkWindow */
8 +
9 +  GdkScreen* screen = gdk_window_get_screen (event.dnd.window);
10 +
11 +  if (screen) 
12 +    {
13 +       GList* windows, *list;
14 +       gint gx, gy;
15 +       
16 +       event.dnd.context->dest_window = NULL;
17 +
18 +       windows = gdk_screen_get_toplevel_windows (screen);
19 +       _gdk_quartz_window_nspoint_to_gdk_xy (aPoint, &gx, &gy);
20 +       
21 +       for (list = windows; list; list = list->next) 
22 +         {
23 +            GdkWindow* win = (GdkWindow*) list->data;
24 +            gint wx, wy;
25 +            gint ww, wh;
26 +            
27 +            gdk_window_get_root_origin (win, &wx, &wy);
28 +            ww = gdk_window_get_width (win);
29 +            wh = gdk_window_get_height (win);
30 +            
31 +            if (gx > wx && 
32 +                gy > wy &&
33 +                gx <= wx + ww && 
34 +                gy <= wy + wh) 
35 +              {
36 +                 /* found a toplevel GdkWindow at the drop position */
37 +                 event.dnd.context->dest_window = win;
38 +              }
39 +         }
40 +    }
41 +
42    (*_gdk_event_func) (&event, _gdk_event_data);
43  
44    g_object_unref (event.dnd.window);