Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / src / device-gtk.c
index 408bc7f..c17c597 100644 (file)
@@ -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);
@@ -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; */
-}
-
 \f
 /************************************************************************/
 /*                            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