Accept a type of TARGETS instead of ATOM, too. Based on a patch by Peng
* gtk/gtkselection.c (gtk_selection_data_get_targets): Accept a type of TARGETS instead of ATOM, too. Based on a patch by Peng Wu. svn path=/trunk/; revision=22141
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 568263 – gtk can't recognize the wrong X Selection TARGETS'
|
||||||
|
type "TARGETS" by java applications
|
||||||
|
|
||||||
|
* gtk/gtkselection.c (gtk_selection_data_get_targets): Accept
|
||||||
|
a type of TARGETS instead of ATOM, too. Based on a patch by
|
||||||
|
Peng Wu.
|
||||||
|
|
||||||
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 568233 – Wrong statement about GtkEntry's "activate" signal
|
Bug 568233 – Wrong statement about GtkEntry's "activate" signal
|
||||||
|
@ -1814,9 +1814,12 @@ gtk_selection_data_get_targets (GtkSelectionData *selection_data,
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (selection_data != NULL, FALSE);
|
g_return_val_if_fail (selection_data != NULL, FALSE);
|
||||||
|
|
||||||
|
/* As usual, java gets it wrong and sets the type to TARGETS, not ATOM
|
||||||
|
*/
|
||||||
if (selection_data->length >= 0 &&
|
if (selection_data->length >= 0 &&
|
||||||
selection_data->format == 32 &&
|
selection_data->format == 32 &&
|
||||||
selection_data->type == GDK_SELECTION_TYPE_ATOM)
|
(selection_data->type == GDK_SELECTION_TYPE_ATOM ||
|
||||||
|
selection_data->type == gtk_selection_atoms[TARGETS]))
|
||||||
{
|
{
|
||||||
if (targets)
|
if (targets)
|
||||||
*targets = g_memdup (selection_data->data, selection_data->length);
|
*targets = g_memdup (selection_data->data, selection_data->length);
|
||||||
|
Reference in New Issue
Block a user