emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] xwidget_mvp 7dafd7e 4/4: Cleanups


From: Joakim Verona
Subject: [Emacs-diffs] xwidget_mvp 7dafd7e 4/4: Cleanups
Date: Thu, 12 Feb 2015 23:26:00 +0000

branch: xwidget_mvp
commit 7dafd7edb71c870b20b983cf431856cc6d3acee2
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    Cleanups
---
 src/dispnew.c       |    4 ++--
 src/emacsgtkfixed.c |   24 +++++++++++++++---------
 src/keyboard.c      |    7 -------
 src/xwidget.c       |   14 +++++++-------
 4 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/src/dispnew.c b/src/dispnew.c
index 5f63c71..a3cc4d5 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -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
 
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index c83d42a..433c143 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -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.
diff --git a/src/keyboard.c b/src/keyboard.c
index 860617b..5acebd3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4131,13 +4131,6 @@ kbd_buffer_get_event (KBOARD **kbp,
          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)
        {
          obj = make_lispy_event (event);
diff --git a/src/xwidget.c b/src/xwidget.c
index 71f9cf6..93f2d51 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -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));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]