]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkselection.c
filechooserbutton: Give proper names to the SELECT_FOLDER tests with cancelled dialog
[~andy/gtk] / gtk / gtkselection.c
index 105acb8a31a9cea3a5ef44a4e8500ebe42c5f64b..67a774f7683107abffe95c8d9a9ddef0e1b6f7f7 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /* This file implements most of the work of the ICCCM selection protocol.
@@ -663,8 +661,8 @@ gtk_target_table_free (GtkTargetEntry *targets,
 
 /**
  * gtk_selection_owner_set_for_display:
- * @display: the #Gdkdisplay where the selection is set
- * @widget: (allow-none): new selection owner (a #GdkWidget), or %NULL.
+ * @display: the #GdkDisplay where the selection is set
+ * @widget: (allow-none): new selection owner (a #GtkWidget), or %NULL.
  * @selection: an interned atom representing the selection to claim.
  * @time_: timestamp with which to claim the selection
  *
@@ -1097,11 +1095,10 @@ gtk_selection_convert (GtkWidget *widget,
     {
       GtkWidget *owner_widget;
       gpointer owner_widget_ptr;
-      GtkSelectionData selection_data;
+      GtkSelectionData selection_data = {0};
       
       selection_data.selection = selection;
       selection_data.target = target;
-      selection_data.data = NULL;
       selection_data.length = -1;
       selection_data.display = display;
       
@@ -2324,15 +2321,7 @@ _gtk_selection_request (GtkWidget *widget,
 
   info->selection = event->selection;
   info->num_incrs = 0;
-
-  /* Create GdkWindow structure for the requestor */
-
-#ifdef GDK_WINDOWING_X11
-  if (GDK_IS_X11_DISPLAY (display))
-    info->requestor = gdk_x11_window_foreign_new_for_display (display, event->requestor);
-  else
-#endif
-    info->requestor = NULL;
+  info->requestor = g_object_ref (event->requestor);
 
   /* Determine conversions we need to perform */
   if (event->target == gtk_selection_atoms[MULTIPLE])