]> git.eshelyaron.com Git - emacs.git/commitdiff
Cleanups
authorJoakim Verona <joakim@verona.se>
Thu, 12 Feb 2015 23:23:29 +0000 (00:23 +0100)
committerJoakim Verona <joakim@verona.se>
Thu, 12 Feb 2015 23:23:29 +0000 (00:23 +0100)
src/dispnew.c
src/emacsgtkfixed.c
src/keyboard.c
src/xwidget.c

index 5f63c7190bf3bd3b55279e96bd32b8f155d6ebe3..a3cc4d505130af3ed05db9d235ace9bbe5ae2632 100644 (file)
@@ -3547,7 +3547,7 @@ update_window (struct window *w, bool force_p)
 #endif
 
 #ifdef HAVE_XWIDGETS
-  xwidget_end_redisplay(w, w->current_matrix);
+  xwidget_end_redisplay (w, w->current_matrix);
 #endif
   clear_glyph_matrix (desired_matrix);
 
@@ -4123,7 +4123,7 @@ scrolling_window (struct window *w, bool header_line_p)
     }
 
 #ifdef HAVE_XWIDGETS
- //currently this is needed to detect xwidget movement reliably. or probably not.
+  /* Currently this seems needed to detect xwidget movement reliably. */
     return 0;
 #endif
 
index c83d42a3c04738a6554b793e1bf2dda23cd6f1c4..433c143832fcd67e012599ce6c070ea8ba3182d1 100644 (file)
@@ -60,10 +60,16 @@ struct GtkFixedPrivateL
 };
 
 static void emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
-                                           GtkAllocation *allocation){
-  //for xwidgets
+                                                  GtkAllocation *allocation)
+{
+  // For xwidgets.
+
+  // This basically re-implements the base class method and adds an
+  // additional case for an xwidget view.
 
-  //TODO 1st call base class method
+  // It would be nicer if the bse class method could be called first,
+  // and the the xview modification only would remain here. It wasn't
+  // possible to solve it that way yet.
   EmacsFixedClass *klass;
   GtkWidgetClass *parent_class;
   struct GtkFixedPrivateL* priv;
@@ -112,12 +118,12 @@ static void emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
       child_allocation.height = child_requisition.height;
 
       struct xwidget_view *xv
-       = g_object_get_data (G_OBJECT (child->widget), XG_XWIDGET_VIEW);
+        = g_object_get_data (G_OBJECT (child->widget), XG_XWIDGET_VIEW);
       if (xv)
-       {
-         child_allocation.width = xv->clip_right;
-         child_allocation.height = xv->clip_bottom - xv->clip_top;
-       }
+        {
+          child_allocation.width = xv->clip_right;
+          child_allocation.height = xv->clip_bottom - xv->clip_top;
+        }
 
       gtk_widget_size_allocate (child->widget, &child_allocation);
     }
@@ -226,7 +232,7 @@ XSetWMSizeHints (Display *d, Window w, XSizeHints* hints, Atom prop)
     }
 
   XChangeProperty (d, w, prop, XA_WM_SIZE_HINTS, 32, PropModeReplace,
-                  (unsigned char *) data, 18);
+                   (unsigned char *) data, 18);
 }
 
 /* Override this X11 function.
index 860617b946b1959b71c7ab745ecbe301d68de446..5acebd3f31fc40ce035878433d3148e856608343 100644 (file)
@@ -4130,13 +4130,6 @@ kbd_buffer_get_event (KBOARD **kbp,
          obj = make_lispy_event (event);
          kbd_fetch_ptr = event + 1;
        }
-#endif
-#ifdef HAVE_INOTIFY
-      else if (event->kind == FILE_NOTIFY_EVENT)
-        {
-          obj = make_lispy_event (event);
-          kbd_fetch_ptr = event + 1;
-        }
 #endif
       else if (event->kind == CONFIG_CHANGED_EVENT)
        {
index 71f9cf627386ec8869a32e0b4ce70f62823d4f14..93f2d514509715172331a0c77ecb19596653601c 100644 (file)
@@ -703,11 +703,11 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
 #define WEBKIT_FN_INIT()                        \
   struct xwidget* xw; \
   CHECK_XWIDGET (xwidget); \
- if(NILP (xwidget)) {printf("ERROR xwidget nil\n"); return Qnil;};    \
-  xw = XXWIDGET(xwidget);                                                    \
-  if(NULL == xw) printf("ERROR xw is 0\n");                               \
-  if((NULL == xw->widget_osr) || !WEBKIT_IS_WEB_VIEW(xw->widget_osr)){  \
-    printf("ERROR xw->widget_osr does not hold a webkit instance\n");\
+ if (NILP (xwidget)) {printf("ERROR xwidget nil\n"); return Qnil;};    \
+  xw = XXWIDGET (xwidget);                                                    \
+  if (NULL == xw) printf("ERROR xw is 0\n");                               \
+  if ((NULL == xw->widget_osr) || !WEBKIT_IS_WEB_VIEW(xw->widget_osr)){  \
+    printf ("ERROR xw->widget_osr does not hold a webkit instance\n");\
     return Qnil;\
   };
 
@@ -1262,7 +1262,7 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix)
   // This only takes care of xwidgets in active windows.  if a window
   // goes away from screen xwidget views wust be deleted
 
-  //  dump_glyph_matrix(matrix, 2);
+  //  dump_glyph_matrix (matrix, 2);
   for (i = 0; i < matrix->nrows; ++i)
     {
       //    dump_glyph_row (MATRIX_ROW (matrix, i), i, glyphs);
@@ -1280,7 +1280,7 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix)
                     {
                       /*
                         The only call to xwidget_end_redisplay is in dispnew
-                         xwidget_end_redisplay(w->current_matrix);
+                         xwidget_end_redisplay (w->current_matrix);
                        */
                       xwidget_touch (xwidget_view_lookup (glyph->u.xwidget,
                                                           w));