Re: DnD semantics sensitive to order of GtkTargetEntry list?



A little more info on my problem.  I ran my script with gdb and set a
breakpoint in gtk_drag_selection_received (gtkdnd.c).  When the order of the
target list is incorrect, the selection_data pointer comes into the function
looking like

    (gdb) p *selection_data
    $20 = {
      selection = 529, 
      target = 338, 
      type = 1, 
      format = 137275832, 
      data = 0x0, 
      length = -1
    }

which is odd, because the word "drag" is highlighted when I perform the
drag.  The gtk_target_list_find call works, dropping execution into this
block

      if (!(site->flags & GTK_DEST_DEFAULT_DROP) ||
          selection_data->length >= 0)
        gtk_signal_emit_by_name (GTK_OBJECT (drop_widget), 
                                 "drag_data_received",
                                 context, info->drop_x, info->drop_y,
                                 selection_data, 
                                 target_info, time);

which fails of course because selection_data->length is -1.

I started to dig into things a little bit more but wound up hosing myself
when Gtk started doing pointer and keyboard grabs as I was stepping through
the code in gdb.  Could someone refresh my memory about how to debug code in
the face of pointer/keyboard grabs?  I suspect at minimum I can ssh into my
laptop from one of my Macs.  Any other options?

-- 
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]