X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fdevice-gtk.c;h=83c684f929defb34131e5ec750b71d65f59a1831;hp=408bc7feb569329c45331962c5d6a7346a26533c;hb=f7019bf646d0d4e750e0186d6e912ec7a3b9da90;hpb=7ee7b9fd0c91842f267cf6e412286d647f68e32a diff --git a/src/device-gtk.c b/src/device-gtk.c index 408bc7f..83c684f 100644 --- a/src/device-gtk.c +++ b/src/device-gtk.c @@ -126,6 +126,9 @@ extern void emacs_gtk_selection_handle (GtkWidget *, guint info, guint time_stamp, gpointer data); +extern void emacs_gtk_selection_clear_event_handle (GtkWidget *widget, + GdkEventSelection *event, + gpointer data); extern void emacs_gtk_selection_received (GtkWidget *widget, GtkSelectionData *selection_data, gpointer user_data); @@ -195,7 +198,7 @@ gtk_init_device (struct device *d, Lisp_Object props) XSETDEVICE (device, d); /* gtk_init() and even gtk_check_init() are so brain dead that - getting an empty argv array causes them to abort. */ + getting an empty argv array causes them to ABORT. */ if (NILP (Vgtk_initial_argv_list)) { signal_simple_error ("gtk-initial-argv-list must be set before creating Gtk devices", Vgtk_initial_argv_list); @@ -284,9 +287,15 @@ gtk_init_device (struct device *d, Lisp_Object props) /* Need to set up some selection handlers */ gtk_selection_add_target (GTK_WIDGET (app_shell), GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0); + gtk_selection_add_target (GTK_WIDGET (app_shell), + gdk_atom_intern("CLIPBOARD", FALSE), + GDK_SELECTION_TYPE_STRING, 0); gtk_signal_connect (GTK_OBJECT (app_shell), "selection_get", GTK_SIGNAL_FUNC (emacs_gtk_selection_handle), NULL); + gtk_signal_connect (GTK_OBJECT (app_shell), "selection_clear_event", + GTK_SIGNAL_FUNC (emacs_gtk_selection_clear_event_handle), + NULL); gtk_signal_connect (GTK_OBJECT (app_shell), "selection_received", GTK_SIGNAL_FUNC (emacs_gtk_selection_received), NULL); @@ -680,12 +689,6 @@ Get the style information for a Gtk device. return (result); } -static unsigned int -gtk_device_implementation_flags (void) -{ - return 0; /* XDEVIMPF_PIXEL_GEOMETRY; */ -} - /************************************************************************/ /* initialization */ @@ -717,7 +720,10 @@ console_type_create_device_gtk (void) CONSOLE_HAS_METHOD (gtk, mark_device); CONSOLE_HAS_METHOD (gtk, delete_device); CONSOLE_HAS_METHOD (gtk, device_system_metrics); - CONSOLE_HAS_METHOD (gtk, device_implementation_flags); + /* CONSOLE_IMPLEMENTATION_FLAGS (gtk, XDEVIMPF_PIXEL_GEOMETRY); */ + /* I inserted the above commented out statement, as the original + implementation of gtk_device_implementation_flags(), which I + deleted, contained commented out XDEVIMPF_PIXEL_GEOMETRY - kkm*/ } void