1. 29 Oct, 2016 1 commit
    • Daniel Colascione's avatar
      Add double-buffering support to reduce flicker · c2907158
      Daniel Colascione authored
      * src/dispextern.h (struct glyph_string): Remove window member
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): Declare.
      
      * src/xterm.h (struct x_display_info): New member supports_xdbe.
      (struct x_output): New members draw_desc and need_buffer_flip.
      (FRAME_X_DRAWABLE, FRAME_X_RAW_DRAWABLE)
      (FRAME_X_DOUBLE_BUFFERED_P)
      (FRAME_X_NEED_BUFFER_FLIP): New macros.
      (set_up_x_back_buffer, tear_down_x_back_buffer)
      (initial_set_up_x_back_buffer): Declare.
      
      * src/xterm.c: Include Xdbe.h.
      (x_begin_cr_clip, x_fill_rectangle, x_draw_rectangle)
      (x_draw_vertical_window_border, x_update_end)
      (x_setup_relief_color, x_draw_relief_rect)
      (x_draw_fringe_bitmap, x_shift_glyphs_for_insert)
      (x_scroll_run, x_draw_hollow_cursor, x_draw_bar_cursor): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately; substitute calls to XClearArea with
      x_clear_area, which DTRT for double buffering.
      (x_clear_window, x_clear_area): In double-buffering mode, use
      rect-drawing X functions instead of XClearWindow and
      XClearArea, which always operate on the front buffer.
      (show_back_buffer): New function.
      (XTframe_up_to_date): Call show_back_buffer when done.
      (x_clear_frame, x_clear_frame_area): Remove obsolete calls to
      gtk_widget_queue_draw to refresh scroll bars; scroll bars are
      now independent X windows.
      (handle_one_xevent): Call font_drop_xrender_surfaces when
      XftDraw might need regenerating; perform buffer flip when
      responding to Expose events; issue front-buffer clearing
      commands as stopgap while we wait for redisplay.
      Call flush_dirty_back_buffers.
      (x_make_frame_visible): Un-bitrot comment; move XSETFRAME
      earlier in function.
      (x_free_frame_resources): Call tear_down_x_back_buffer when
      destroying frame.
      (x_term_init): Attempt to initialize double buffer extension.
      (x_flip_and_flush): New function.
      (x_redisplay_interface): Point to x_flip_and_flush instead of
      x_flip directly.
      (flush_dirty_back_buffers): New function.
      (x_create_terminal): Register buffer_flipping_unblocked_hook.
      
      * src/xftfont.c (xftfont_drop_xrender_surfaces): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (xftfont_draw): Call x_mark_frame_dirty.
      (xftfont_drop_xrender_surfaces): New function.
      (syms_of_xftfont): Register it.
      
      * src/xfont.c (xfont_draw): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xfns.c: Include Xdbe.h.
      (x_set_inhibit_double_buffering, set_up_x_back_buffer)
      (Fx_double_buffered_p): New functions.
      (x_window): Call initial_set_up_x_back_buffer.
      (x_make_gc): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (Fx_create_frame): Configure `inhibit-double-buffering'
      frame parameter.
      (x_create_tip_frame): Call initial_set_up_x_back_buffer.
      (x_frame_parm_handlers): Register
      x_set_inhibit_double_buffering.
      (syms_of_xfns): Register Sx_double_buffered_p.
      (x_mark_frame_dirty): Define.
      
      * src/xfaces.c (x_create_gc): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/xdisp.c (remember_mouse_glyph, init_glyph_string): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW.
      (redisplay_internal): Restart redisplay if a frame is garbaged
      during updating; explain why. Block buffer flips
      during redisplay.
      (redisplay_preserve_echo_area): Block buffer flip during call
      to redisplay_internal.
      (buffer_flip_blocked_depth): New variable.
      (block_buffer_flips, unblock_buffer_flips)
      (buffer_flipping_blocked_p): New functions.
      (init_glyph_string): Stop setting window member of struct
      glyph_string.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/termhooks.h (struct terminal): Add
      buffer_flipping_unblocked_hook.
      
      * src/nsfns.m (ns_frame_parm_handlers): Add placeholder for
      x_set_inhibit_double_buffering.
      
      * src/image.c (x_create_bitmap_from_data)
      (x_create_bitmap_from_file, x_create_x_image_and_pixmap)
      (Create_Pixmap_From_Bitmap_Data)
      (x_create_bitmap_from_xpm_data, xpm_load, gs_load): Use
      FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local
      variables appropriately.
      
      * src/gtkutil.c: Include Xdbe.h.
      (xg_get_widget_from_map): Forward declare.
      (xg_clear_under_internal_border): Remove obsolete calls to
      refresh scroll bars.
      (xg_create_frame_widgets): Call initial_set_up_x_back_buffer.
      (xg_free_frame_widgets): Call tear_down_x_back_buffer; reset
      FRAME_X_DRAWABLE as well as FRAME_X_WINDOW and for the
      same reason.
      (xg_set_background_color): Set scroll bar background colors.
      (xg_finish_scroll_bar_creation): New function with common
      logic of xg_create_scroll_bar, xg_create_horizontal_scroll_bar. Force
      scroll bars to be real X11 windows.
      (xg_create_scroll_bar, xg_create_horizontal_scroll_bar): Call
      xg_finish_scroll_bar_creation.
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
      Remove obsolete calls to refresh scroll bars; fix comments.
      
      * src/ftxfont.c (ftxfont_get_gcs, ftxfont_draw_bitmap,
      (ftxfont_draw_background): Use FRAME_X_DRAWABLE instead of
      FRAME_X_WINDOW.
      
      * src/frame.c (frame_parms): Add table entry for new
      `inhibit-double-buffering' frame parameter
      (syms_of_frame): Register Qinhibit_double_buffering.
      
      * src/font.h (struct font_driver): Add new `flush_frame_caches' hook.
      (font_drop_xrender_surfaces): Declare.
      
      * src/font.c (font_drop_xrender_surfaces): New function.
      
      * src/Makefile.in (XDBE_LIBS, XDBE_CFLAGS): Substitute.
      
      * etc/NEWS: Mention use of double buffering
      
      * doc/lispref/frames.texi (Management Parameters): Document
      `inhibit-double-buffering' frame parameters.
      (Visibility of Frames): Document `x-double-buffered-p'.
      
      * configure.ac: Check for the X double buffer extension
      c2907158
  2. 04 Dec, 2012 1 commit
  3. 19 Nov, 2011 1 commit
  4. 16 Apr, 2011 1 commit
    • Paul Eggert's avatar
      Modernize to C89, for better static checking. · 55660072
      Paul Eggert authored
      * Activate.c (XMenuActivate): Callback's first arg is readonly.
      * AddPane.c (XMenuAddPane): Label is readonly.  Rename local
      to avoid shadowing.
      * AddSel.c (XMenuAddSelection): Help arg is readonly.  Rename local.
      * Create.c (atoi, atof): Remove decls; include <stdlib.h>.
      (MAX_INACT_PNUM, TILE_BUF_SIZE): Remove; unused.
      (x_get_resource_string): Args are readonly.
      (XAllocDisplayColor): colorName is readonly.
      (XMenuCreate): def_env is readonly.  Remove unused locals.  Avoid
      "else;".
      * Destroy.c (XMenuDestroy): Return void.
      * Error.c (XMenuError): Remove const pointer.
      * EvHand.c (XMenuEventHandler): Return void.
      * FindPane.c, FindSel.c: Include <string.h>.
      * InsPane.c (XMenuInsertPane): Rename local to avoid shadowing.
      * InsSel.c (XMenuInsertSelection): Likewise.
      * Internal.c (toggle_color, BUFFER_SIZE): Remove; unused.
      (_XMErrorList): Now const.
      (_XMWinQueInit, _XMRecomputeGlobals, _XMTransToOrigin, _XMRefreshPane):
      (_XMRefreshSelection): Return void.
      (_XMWinQueFlush, _XMRefreshSelection): Rename locals to avoid
      shadowing.
      (_XMWinQueFlush): Use stack, not heap.  Don't use uninitialized var.
      * SetAEQ.c (XMenuSetAEQ): Now returns void.
      * SetFrz.c (XMenuSetFreeze): Likewise.
      * X10.h (XAssoc): Use void * for generic pointer.
      * XDelAssoc.c: Include XMenuInt.h rather than duplicating part of it.
      * XDestAssoc.c, XMakeAssoc.c: Likewise.
      * XDestAssoc.c (XDestroyAssocTable): Return void.
      * XMakeAssoc.c (XMakeAssoc): Use void * for generic pointer.
      * XMenu.h, XMenuInt.h: Adjust to signature changes.  Use const
      for pointers to readonly storage.
      * insque.c: Include XMenuInt.h, to check our own signature.
      (emacs_insque, emacs_remque): Use void * for generic pointers.
      55660072
  5. 15 Jan, 2011 1 commit
  6. 04 Jul, 2010 1 commit
    • Dan Nicolaescu's avatar
      Convert function definitions in oldXMenu to standard C. · b782e2d7
      Dan Nicolaescu authored
      * oldXMenu/Activate.c: Convert function definitions to standard C.
      * oldXMenu/AddPane.c:
      * oldXMenu/AddSel.c:
      * oldXMenu/ChgPane.c:
      * oldXMenu/ChgSel.c:
      * oldXMenu/Create.c:
      * oldXMenu/DelPane.c:
      * oldXMenu/DelSel.c:
      * oldXMenu/Destroy.c:
      * oldXMenu/Error.c:
      * oldXMenu/EvHand.c:
      * oldXMenu/FindPane.c:
      * oldXMenu/FindSel.c:
      * oldXMenu/InsPane.c:
      * oldXMenu/InsSel.c:
      * oldXMenu/Internal.c:
      * oldXMenu/Locate.c:
      * oldXMenu/Post.c:
      * oldXMenu/Recomp.c:
      * oldXMenu/SetAEQ.c:
      * oldXMenu/SetFrz.c:
      * oldXMenu/SetPane.c:
      * oldXMenu/SetSel.c:
      * oldXMenu/X10.h:
      * oldXMenu/XCrAssoc.c:
      * oldXMenu/XDelAssoc.c:
      * oldXMenu/XDestAssoc.c:
      * oldXMenu/XLookAssoc.c:
      * oldXMenu/XMakeAssoc.c:
      * oldXMenu/XMenu.h:
      * oldXMenu/XMenuInt.h:
      * oldXMenu/insque.c: Likewise.
      b782e2d7
  7. 27 Feb, 2007 1 commit
  8. 21 Jan, 2007 1 commit
  9. 10 Dec, 2006 1 commit
  10. 05 Feb, 2006 1 commit
  11. 16 Aug, 2005 1 commit
  12. 16 Apr, 2004 1 commit
  13. 10 Apr, 2004 1 commit
    • Miles Bader's avatar
      Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-196 · 1f3ddf11
      Miles Bader authored
      Remove RCS keywords
      
      2004-04-10  Miles Bader  <miles@gnu.org>
      
         RCS keyword removal (only non-comment changes are enumerated here):
      
         * lisp/emacs-lisp/bytecomp.el (byte-compile-version): Variable removed.
         (byte-compile-insert-header): Don't use `byte-compile-version'.
         * lisp/url/url-vars.el (url-version): Use the constant string "Emacs"
         instead of calculating something from the RCS `State' keyword
         [the latter is almost entirely useless anyway].
         * lisp/forms.el (forms-version): Variable removed.
         (forms-mode): Don't use `forms-version'.
         * lisp/recentf.el (recentf-version): Variable removed.
         * lisp/progmodes/delphi.el (delphi-version): Variable removed.
         * lisp/progmodes/ada-mode.el (ada-mode): RCS keyword removed from docstring.
      1f3ddf11
  14. 24 Dec, 2003 1 commit
  15. 08 Sep, 2003 1 commit
  16. 01 Sep, 2003 1 commit
  17. 04 Feb, 2003 1 commit
  18. 27 Jan, 2000 1 commit
  19. 03 Oct, 1999 1 commit
    • Dave Love's avatar
      # · e745ede7
      Dave Love authored
      e745ede7