* 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.
/**
* 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
*
{
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;
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])