Mercurial > hg > xemacs-beta
changeset 5239:f19e6bc25969
Backed out changeset 6466bc9ebf15
This would leave all but the first frame blank.
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Tue, 13 Jul 2010 10:19:33 +0200 |
parents | 6466bc9ebf15 |
children | fca0cf0971de |
files | lisp/gtk-widget-accessors.el src/ChangeLog src/console-x-impl.h src/device-x.c src/frame-x.c src/redisplay-xlike-inc.c |
diffstat | 6 files changed, 59 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gtk-widget-accessors.el Wed Jun 23 08:04:18 2010 -0400 +++ b/lisp/gtk-widget-accessors.el Tue Jul 13 10:19:33 2010 +0200 @@ -20,28 +20,28 @@ (require 'gtk-ffi) -(defconst G_TYPE_INVALID 0) -(defconst G_TYPE_NONE 1) -(defconst G_TYPE_CHAR 2) -(defconst G_TYPE_UCHAR 3) -(defconst G_TYPE_BOOL 4) -(defconst G_TYPE_INT 5) -(defconst G_TYPE_UINT 6) -(defconst G_TYPE_LONG 7) -(defconst G_TYPE_ULONG 8) -(defconst G_TYPE_FLOAT 9) -(defconst G_TYPE_DOUBLE 10) -(defconst G_TYPE_STRING 11) -(defconst G_TYPE_ENUM 12) -(defconst G_TYPE_FLAGS 13) -(defconst G_TYPE_BOXED 14) -(defconst G_TYPE_POINTER 15) -(defconst G_TYPE_SIGNAL 16) -(defconst G_TYPE_ARGS 17) -(defconst G_TYPE_CALLBACK 18) -(defconst G_TYPE_C_CALLBACK 19) -(defconst G_TYPE_FOREIGN 20) -(defconst G_TYPE_OBJECT 21) +(defconst GTK_TYPE_INVALID 0) +(defconst GTK_TYPE_NONE 1) +(defconst GTK_TYPE_CHAR 2) +(defconst GTK_TYPE_UCHAR 3) +(defconst GTK_TYPE_BOOL 4) +(defconst GTK_TYPE_INT 5) +(defconst GTK_TYPE_UINT 6) +(defconst GTK_TYPE_LONG 7) +(defconst GTK_TYPE_ULONG 8) +(defconst GTK_TYPE_FLOAT 9) +(defconst GTK_TYPE_DOUBLE 10) +(defconst GTK_TYPE_STRING 11) +(defconst GTK_TYPE_ENUM 12) +(defconst GTK_TYPE_FLAGS 13) +(defconst GTK_TYPE_BOXED 14) +(defconst GTK_TYPE_POINTER 15) +(defconst GTK_TYPE_SIGNAL 16) +(defconst GTK_TYPE_ARGS 17) +(defconst GTK_TYPE_CALLBACK 18) +(defconst GTK_TYPE_C_CALLBACK 19) +(defconst GTK_TYPE_FOREIGN 20) +(defconst GTK_TYPE_OBJECT 21) (defconst gtk-value-accessor-names '("INVALID" "NONE" "CHAR" "UCHAR" "BOOL" "INT" "UINT" "LONG" "ULONG" "FLOAT" "DOUBLE" @@ -88,8 +88,8 @@ "\n" (format "\tthe_obj = GTK_%s (XGTK_OBJECT (obj)->object);\n" wrapper) - (format "\targ.type = g_type_from_name (\"%s\");\n" (symbol-name (car arg)))) -; (format "\targ.type = G_TYPE_%s;\n" (or + (format "\targ.type = gtk_type_from_name (\"%s\");\n" (symbol-name (car arg)))) +; (format "\targ.type = GTK_TYPE_%s;\n" (or ; (nth (gtk-fundamental-type (car arg)) ; gtk-value-accessor-names) ; (case (car arg) @@ -100,12 +100,12 @@ (setq base-arg-type (gtk-fundamental-type (car arg))) (cond - ((= base-arg-type G_TYPE_OBJECT) + ((= base-arg-type GTK_TYPE_OBJECT) (insert (format "\tGTK_VALUE_OBJECT (arg) = GTK_OBJECT (the_obj->%s);" (cdr arg)))) - ((or (= base-arg-type G_TYPE_POINTER) - (= base-arg-type G_TYPE_BOXED)) + ((or (= base-arg-type GTK_TYPE_POINTER) + (= base-arg-type GTK_TYPE_BOXED)) (insert (format "\tGTK_VALUE_%s (arg) = (void *)the_obj->%s;" (nth (gtk-fundamental-type (car arg)) gtk-value-accessor-names) @@ -117,7 +117,7 @@ (cdr arg))))) (insert "\n" - "\treturn (g_type_to_lisp (&arg));\n" + "\treturn (gtk_type_to_lisp (&arg));\n" "}\n\n") (push c-func-name func-names)) func-names))
--- a/src/ChangeLog Wed Jun 23 08:04:18 2010 -0400 +++ b/src/ChangeLog Tue Jul 13 10:19:33 2010 +0200 @@ -1,19 +1,3 @@ -2010-06-21 Jeff Sparkes <jsparkes@gmail.com> - - * console-x-impl.h (DEVICE_X_XFTDRAW): Define, instead of - FRAME_X_FTDRAW. - (struct x_device): Add XftDraw field. - (struct x_frame): Remove XftDraw field. - Move XftDraw from frame to device for improved caching. - - * device-x.c (x_delete_device): Free XftDraw here. - - * frame-x.c (x_delete_frame): Remove freeing of XftDraw. - - * redisplay-xlike-inc.c (XLIKE_output_string): Use - DEVICE_X_XFTDRAW instead of FRAME_X_XFTDRAW when lazily creating - XftDraw structure. - 2010-06-13 Stephen J. Turnbull <stephen@xemacs.org> * elhash.c:
--- a/src/console-x-impl.h Wed Jun 23 08:04:18 2010 -0400 +++ b/src/console-x-impl.h Tue Jul 13 10:19:33 2010 +0200 @@ -68,17 +68,6 @@ /* Used by x_bevel_modeline in redisplay-x.c */ Pixmap gray_pixmap; -#ifdef HAVE_XFT - /* The Xft Drawable wrapper for this device. */ - /* This is persistent to take advantage of the ability of Xft's glyph - cache in the server, and avoid rendering the font again and again... - - This is created the first time through redisplay, and destroyed when our - connection to the X display is destroyed. */ - XftDraw *xftDraw; -#endif - - /* Atoms associated with this device. */ /* allocated in Xatoms_of_device_x */ Atom Xatom_WM_PROTOCOLS; @@ -198,7 +187,6 @@ #define DEVICE_XT_APP_SHELL(d) (DEVICE_X_DATA (d)->Xt_app_shell) #define DEVICE_X_GC_CACHE(d) (DEVICE_X_DATA (d)->gc_cache) #define DEVICE_X_GRAY_PIXMAP(d) (DEVICE_X_DATA (d)->gray_pixmap) -#define DEVICE_X_XFTDRAW(d) (DEVICE_X_DATA (d)->xftDraw) #define DEVICE_X_WM_COMMAND_FRAME(d) (DEVICE_X_DATA (d)->WM_COMMAND_frame) #define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp) #define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->global_mouse_timestamp) @@ -331,6 +319,17 @@ #endif /* XIM_XLIB */ #endif /* HAVE_XIM */ +#ifdef HAVE_XFT + /* The Xft Drawable wrapper for this device. + #### Should this be per-device, or per-frame? */ + /* This is persistent to take advantage of the ability of Xft's glyph + cache in the server, and avoid rendering the font again and again... + + This is created the first time through redisplay, and destroyed when our + connection to the X display is destroyed. */ + XftDraw *xftDraw; +#endif + /* 1 if the frame is completely visible on the display, 0 otherwise. if 0 the frame may have been iconified or may be totally or partially hidden by another X window */ @@ -392,6 +391,10 @@ #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please) +#ifdef HAVE_XFT +#define FRAME_X_XFTDRAW(f) (FRAME_X_DATA (f)->xftDraw) +#endif + #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p) #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p)
--- a/src/device-x.c Wed Jun 23 08:04:18 2010 -0400 +++ b/src/device-x.c Tue Jul 13 10:19:33 2010 +0200 @@ -946,18 +946,6 @@ int checking_free; #endif -#ifdef HAVE_XFT - /* If we have an XftDraw structure, we need to free it here. - We can't ever have an XftDraw without a Display, so we are safe - to free it in here, and we avoid too much playing around with the - malloc checking hooks this way. */ - if (DEVICE_X_XFTDRAW (d)) - { - XftDrawDestroy (DEVICE_X_XFTDRAW (d)); - DEVICE_X_XFTDRAW (d) = NULL; - } -#endif - display = DEVICE_X_DISPLAY (d); if (display)
--- a/src/frame-x.c Wed Jun 23 08:04:18 2010 -0400 +++ b/src/frame-x.c Tue Jul 13 10:19:33 2010 +0200 @@ -2614,6 +2614,19 @@ DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f)); #endif /* HAVE_CDE */ +#ifdef HAVE_XFT + /* If we have an XftDraw structure, we need to free it here. + We can't ever have an XftDraw without a Display, so we are safe + to free it in here, and we avoid too much playing around with the + malloc checking hooks this way. */ + if (FRAME_X_XFTDRAW (f)) + { + XftDrawDestroy (FRAME_X_XFTDRAW (f)); + FRAME_X_XFTDRAW (f) = NULL; + } +#endif + + assert (FRAME_X_SHELL_WIDGET (f) != 0); dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f));
--- a/src/redisplay-xlike-inc.c Wed Jun 23 08:04:18 2010 -0400 +++ b/src/redisplay-xlike-inc.c Tue Jul 13 10:19:33 2010 +0200 @@ -1028,10 +1028,10 @@ XftDraw *xftDraw; /* Lazily initialize frame's xftDraw member. */ - if (!DEVICE_X_XFTDRAW (d)) { - DEVICE_X_XFTDRAW (d) = XftDrawCreate (dpy, x_win, visual, cmap); + if (!FRAME_X_XFTDRAW (f)) { + FRAME_X_XFTDRAW (f) = XftDrawCreate (dpy, x_win, visual, cmap); } - xftDraw = DEVICE_X_XFTDRAW (d); + xftDraw = FRAME_X_XFTDRAW (f); /* #### This will probably cause asserts when passed a Lisp integer for a color. See ca. line 759 this file.