]> code.delx.au - gnu-emacs/blobdiff - src/xterm.c
Merge branch 'trunk' into xwidget
[gnu-emacs] / src / xterm.c
index 818b69cc41d12549923e7678ed49cdea118322cc..547bdbe8333598133e26aa78ffce1741e7801d7c 100644 (file)
@@ -55,6 +55,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "coding.h"
 #include "frame.h"
 #include "dispextern.h"
+#ifdef HAVE_XWIDGETS
+#include "xwidget.h"
+#endif
 #include "fontset.h"
 #include "termhooks.h"
 #include "termopts.h"
@@ -2749,7 +2752,13 @@ x_draw_glyph_string (struct glyph_string *s)
     case IMAGE_GLYPH:
       x_draw_image_glyph_string (s);
       break;
-
+#ifdef HAVE_XWIDGETS
+    case XWIDGET_GLYPH:
+      //erase xwidget background
+      //x_draw_glyph_string_background (s, 0);
+      x_draw_xwidget_glyph_string (s);
+      break;
+#endif
     case STRETCH_GLYPH:
       x_draw_stretch_glyph_string (s);
       break;
@@ -7287,7 +7296,12 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
   cursor_glyph = get_phys_cursor_glyph (w);
   if (cursor_glyph == NULL)
     return;
-
+#ifdef HAVE_XWIDGETS  
+  if (cursor_glyph->type == XWIDGET_GLYPH){
+    printf("tried avoiding xwidget cursor\n");
+    return; //experimental avoidance of cursor on xwidget
+  }
+#endif  
   /* If on an image, draw like a normal cursor.  That's usually better
      visible than drawing a bar, esp. if the image is large so that
      the bar might not be in the window.  */
@@ -9907,6 +9921,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
            https://bugzilla.gnome.org/show_bug.cgi?id=563627.  */
         id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
                                   | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+#ifdef HAVE_CLUTTER
+        gtk_clutter_init (&argc, &argv2);
+#else
 
         /* NULL window -> events for all windows go to our function.
            Call before gtk_init so Gtk+ event filters comes after our.  */
@@ -9915,6 +9932,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
         /* gtk_init does set_locale.  Fix locale before and after.  */
         fixup_locale ();
         gtk_init (&argc, &argv2);
+#endif
         fixup_locale ();
 
         g_log_remove_handler ("GLib", id);