bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

classic Classic list List threaded Threaded
43 messages Options
123
Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Aaron Jensen

Now that undecorated frames are a reality, some cool stuff is happening
like posframe:

https://github.com/tumashu/posframe

and

https://github.com/tumashu/ivy-posframe

posframe creates and manages child frames at a position in a buffer. It
uses `fit-frame-to-buffer' to resize frames.

It appears that (on macOS, at least) when a frame is resized, there is
an unsightly flicker. It does not matter if the frame is undecorated or
not.

Here is a repro. It requires posframe, but that's just because it was
easier to set up this way for me. I'm sure it could be reproduced with
vanilla emacs functions:

  (require 'posframe)
  (setq my-timer
        (run-with-timer 0 0.2
                        (lambda ()
                          (posframe-show " *my-posframe-buffer*" :string "hello" :min-width 10 :min-height 10 :position 1)
                          (run-with-timer 0.1 nil
                                          (lambda ()
                                            (posframe-show " *my-posframe-buffer*" :min-width 10 :min-height 11 :position 1))))))

To end the flicker storm:

  (cancel-timer my-timer)
  (posframe-delete-all)

For reference, this was originally reported here: https://github.com/tumashu/ivy-posframe/issues/7


In GNU Emacs 26.0.91 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102))
 of 2018-03-02 built on aaron-mbt.local
Repository revision: 6719f05ff75ec19e45e40b98d8b0c6184168ac5e
Windowing system distributor 'Apple', version 10.3.1561
Recent messages:
syntax-ppss: Lisp nesting exceeds ‘max-lisp-eval-depth’
Search failed: there is an unmatched expression somewhere or we are at the beginning/end of file. [12 times]
Indenting region...done
Saving file /Users/aaronjensen/Dropbox (Personal)/Notes/refile.org...
Wrote /Users/aaronjensen/Dropbox (Personal)/Notes/refile.org
g c
Saving file /Users/aaronjensen/.emacs.d/elpa/26.0/develop/posframe-20180227.305/posframe.el...
Wrote /Users/aaronjensen/.emacs.d/elpa/26.0/develop/posframe-20180227.305/posframe.el
Wrote /Users/aaronjensen/.emacs.d/elpa/26.0/develop/posframe-20180227.305/posframe.elc
Wrote /Users/aaronjensen/.emacs.d/elpa/26.0/develop/posframe-20180227.305/posframe.{el,elc}

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs-plus/HEAD-6719f05/share/info/emacs
 --prefix=/usr/local/Cellar/emacs-plus/HEAD-6719f05 --with-xml2
 --without-dbus --with-gnutls --with-imagemagick --with-modules
 --with-rsvg --with-ns --disable-ns-self-contained'

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS MODULES THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  company-statistics-mode: t
  company-childframe-mode: t
  company-mode: t
  auto-compile-mode: t
  elisp-slime-nav-mode: t
  eros-mode: t
  lispyville-mode: t
  lispy-mode: t
  nameless-mode: t
  goto-address-prog-mode: t
  auto-highlight-symbol-mode: t
  dtrt-indent-mode: t
  highlight-numbers-mode: t
  highlight-parentheses-mode: t
  rainbow-delimiters-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  bug-reference-prog-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  auto-dim-other-buffers-mode: t
  global-git-gutter+-mode: t
  git-gutter+-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  projectile-mode: t
  recentf-mode: t
  persp-mode: t
  desktop-save-mode: t
  global-wakatime-mode: t
  wakatime-mode: t
  evil-mc-mode: t
  hl-todo-mode: t
  global-spacemacs-whitespace-cleanup-mode: t
  spacemacs-whitespace-cleanup-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  winum-mode: t
  winner-mode: t
  pupo-mode: t
  purpose-mode: t
  global-vi-tilde-fringe-mode: t
  vi-tilde-fringe-mode: t
  save-place-mode: t
  savehist-mode: t
  global-origami-mode: t
  origami-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  flx-ido-mode: t
  eyebrowse-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-evil-search-highlight-persist: t
  evil-search-highlight-persist: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  evil-lion-mode: t
  evil-escape-mode: t
  global-anzu-mode: t
  anzu-mode: t
  eval-sexp-fu-flash-mode: t
  editorconfig-mode: t
  counsel-mode: t
  ivy-mode: t
  delete-selection-mode: t
  clean-aindent-mode: t
  hybrid-mode: t
  which-key-mode: t
  override-global-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-mode: t
  evil-local-mode: t
  spacemacs-leader-override-mode: t
  global-spacemacs-leader-override-mode: t
  global-hl-line-mode: t
  xterm-mouse-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  ido-vertical-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t
  hs-minor-mode: t

Load-path shadows:
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/ht-20180129.1434/ht hides /Users/aaronjensen/.emacs.d/core/libs/ht
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/inf-ruby-20180226.1511/inf-ruby hides /usr/local/share/emacs/site-lisp/ruby/inf-ruby
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-stan hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-stan
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-exp hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-exp
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-J hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-J
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-eshell hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-eshell
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-emacs-lisp hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-emacs-lisp
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-gnus hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-gnus
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-css hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-css
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-lob hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-lob
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-forth hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-forth
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-macs hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-macs
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-version hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-version
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-scheme hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-scheme
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-abc hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-abc
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-C hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-C
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-capture hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-capture
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ref hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ref
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-clojure hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-clojure
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-mouse hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-mouse
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ledger hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ledger
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-ctags hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-ctags
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-entities hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-entities
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-archive hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-archive
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-screen hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-screen
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-haskell hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-haskell
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-asymptote hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-asymptote
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-mhe hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-mhe
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-table hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-table
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-keys hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-keys
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-org hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-org
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-plot hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-plot
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-awk hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-awk
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-groovy hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-groovy
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-octave hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-octave
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-faces hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-faces
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-colview hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-colview
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-R hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-R
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-timer hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-timer
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ebnf hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ebnf
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-mobile hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-mobile
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-fortran hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-fortran
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-shell hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-shell
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-perl hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-perl
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-sqlite hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-sqlite
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-sed hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-sed
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-list hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-list
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ruby hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ruby
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-eval hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-eval
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-habit hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-habit
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-clock hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-clock
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-html hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-html
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-src hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-src
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-lisp hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-lisp
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ditaa hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ditaa
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-pcomplete hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-pcomplete
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-lint hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-lint
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-rmail hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-rmail
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-latex hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-latex
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-sass hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-sass
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-io hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-io
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-tangle hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-tangle
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-calc hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-calc
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-java hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-java
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-icalendar hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-icalendar
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-eww hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-eww
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-md hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-md
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-beamer hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-beamer
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-element hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-element
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-protocol hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-protocol
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-mscgen hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-mscgen
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-gnuplot hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-gnuplot
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-latex hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-latex
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-id hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-id
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-vala hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-vala
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-man hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-man
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-feed hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-feed
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-lua hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-lua
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-table hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-table
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-ocaml hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-ocaml
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-coq hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-coq
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-picolisp hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-picolisp
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-indent hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-indent
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-lilypond hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-lilypond
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-matlab hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-matlab
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-datetree hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-datetree
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-python hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-python
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-bbdb hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-bbdb
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-makefile hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-makefile
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-duration hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-duration
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-agenda hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-agenda
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-dot hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-dot
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-js hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-js
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-publish hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-publish
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-inlinetask hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-inlinetask
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-org hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-org
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-core hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-core
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-compat hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-compat
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-docview hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-docview
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-odt hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-odt
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-plantuml hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-plantuml
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-ascii hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-ascii
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-loaddefs hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-loaddefs
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-w3m hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-w3m
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-bibtex hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-bibtex
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-info hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-info
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-hledger hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-hledger
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-maxima hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-maxima
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-macro hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-macro
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-sql hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-sql
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-attach hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-attach
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-processing hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-processing
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ox-texinfo hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ox-texinfo
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-irc hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-irc
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-crypt hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-crypt
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-footnote hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-footnote
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/org-install hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/org-install
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-comint hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-comint
/Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180226/ob-shen hides /usr/local/Cellar/emacs-plus/HEAD-6719f05/share/emacs/26.0.91/lisp/org/ob-shen

Features:
(shadow sort mail-extr evil-nerd-commenter evil-nerd-commenter-operator
evil-nerd-commenter-sdk misearch multi-isearch counsel-projectile tmux
emacsbug sendmail smex appt diary-lib diary-loaddefs epa-file org-agenda
executable pp vc-git org-gcal org-archive request-deferred deferred
request alert log4e notifications dbus xml gntp company-tng eieio-opt
speedbar sb-image ezimage dframe colir tabify shrink-path open-junk-file
company-emoji company-emoji-list org-eldoc evil-org org-table ob-shell
ob-ruby ob-restclient restclient ob-http ob-http-mode ob-elixir
company-statistics company-files company-keywords company-dabbrev-code
company-dabbrev company-capf company-childframe posframe company
overseer pkg-info epl f auto-compile packed elisp-slime-nav eros
flycheck-package package-lint finder lispyville lispy iedit iedit-lib
multiple-cursors-core lispy-inline avy semantic/db semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
cedet evil-ediff ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff edebug lispy-tags nameless goto-addr
auto-highlight-symbol dtrt-indent highlight-numbers parent-mode
highlight-parentheses hideshow rainbow-delimiters org-bullets
org-download toc-org yasnippet-snippets yasnippet elec-pair org-indent
image-file org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader
org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb
org-w3m org-checklist org-inlinetask smartparens-org ox-gfm ox-md
ox-reveal ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox orgit org-element
avl-tree generator magithub magithub-dash magithub-notification
magithub-issue-view magithub-comment magithub-repo magithub-orgs
magithub-issue-tricks magithub-issue-post magithub-edit-mode magithub-ci
magithub-issue magithub-label magithub-user magithub-core magithub-faces
magithub-settings smartparens-markdown markdown-mode bug-reference ghub+
apiwrap apropos evil-magit git-rebase magit-gh-pulls gh gh-users
gh-issues gh-pulls gh-repos gh-comments gh-gist gh-oauth gh-api logito
gh-cache gh-auth gh-url url-http tls gnutls url-gw nsm magit-obsolete
magit-blame magit-stash magit-bisect magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-collab ghub url-auth url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode
magit-core magit-autorevert magit-process magit-margin magit-mode org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs editorconfig-core
editorconfig-core-handle editorconfig-fnmatch face-remap
auto-dim-other-buffers git-gutter-fringe+ fringe-helper git-gutter+
git-commit with-editor magit-git magit-section magit-utils crm
magit-popup async-bytecomp async log-edit message rmc puny rfc822 mml
mml-sec epa gnus-util rmail rmail-loaddefs mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log projectile grep recentf
tree-widget persp-mode desktop frameset wakatime-mode contextual-menubar
quiet-emacs fill-or-unfill init-macos-terminal-copy-paste init-flyspell
init-terminal-cursor evil-terminal-cursor-changer init-org init-magit
evil-mc evil-mc-command-execute evil-mc-command-record
evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo
evil-mc-vars evil-mc-known-commands evil-mc-common hl-todo
persistent-soft list-utils pcache eieio-base font-utils server zone
spacemacs-whitespace-cleanup ws-butler winum winner
spacemacs-purpose-popwin window-purpose-x imenu-list imenu ibuf-ext
ibuffer ibuffer-loaddefs window-purpose window-purpose-fixes
window-purpose-prefix-overload window-purpose-switch
window-purpose-layout window-purpose-core window-purpose-configuration
window-purpose-utils vi-tilde-fringe unicode-fonts smartparens-config
smartparens-text saveplace savehist popwin osx-trash origami
origami-parsers linum ivy-hydra info+ flycheck-pos-tip pos-tip flycheck
find-func flx-ido eyebrowse evil-surround evil-search-highlight-persist
evil-numbers evil-lisp-state smartparens evil-lion evil-indent-plus
evil-exchange evil-escape evil-anzu anzu eval-sexp-fu highlight
font-lock+ frame-fns avoid editorconfig noutline outline doom-modeline
let-alist powerline-separators color all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons memoize counsel dired dired-loaddefs
compile esh-util etags xref project swiper ivy flx delsel ivy-overlay
ffap clean-aindent-mode gh-common gh-profile s marshal dash rx
docker-tramp tramp-cache hybrid-mode exec-path-from-shell
evil-evilified-state which-key use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core hydra lv cus-edit cus-start cus-load evil
evil-integration undo-tree diff evil-maps evil-commands reveal flyspell
ispell evil-jumps evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core evil-common windmove
thingatpt rect evil-digraphs diminish evil-vars bind-map quelpa help-fns
radix-tree package-build mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr json map lisp-mnt
hl-line xt-mouse autorevert filenotify cl-extra disp-table wid-edit
monokai-theme info finder-inf patch-server init-sass init-php init-html
init-evil tramp tramp-compat tramp-loaddefs trampver shell pcomplete
comint ansi-color ring parse-time format-spec ido-vertical-mode ido
core-spacemacs core-use-package-ext core-transient-state
core-micro-state core-toggle core-keybindings core-fonts-support
core-themes-support core-display-init core-jump core-release-management
core-custom-settings core-configuration-layer eieio-compat
core-spacemacs-buffer core-funcs core-dotspacemacs ht cl help-mode
warnings package url-handlers url-parse auth-source cl-seq
password-cache url-vars seq eieio byte-opt bytecomp byte-compile cconv
eieio-core eieio-loaddefs epg epg-config core-command-line pcase
core-debug edmacro kmacro derived cl-macs gv advice profiler easymenu
cl-loaddefs cl-lib page-break-lines easy-mmode core-emacs-backports
subr-x time-date tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote kqueue cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 1411209 431571)
 (symbols 48 82837 1)
 (miscs 40 2876 4265)
 (strings 32 311225 33216)
 (string-bytes 1 10567800)
 (vectors 16 139011)
 (vector-slots 8 3139062 163364)
 (floats 8 1044 1162)
 (intervals 56 22198 2513)
 (buffers 992 77))



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
On Sun, Mar 04, 2018 at 09:38:27AM -0800, Aaron Jensen wrote:
> It appears that (on macOS, at least) when a frame is resized, there is
> an unsightly flicker. It does not matter if the frame is undecorated or
> not.

Simpler repro:

(dotimes (n 10)
  (set-frame-parameter nil 'width (+ 80 n))
  (sit-for 0.1))

--
Alan Third



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
On Sun, Mar 04, 2018 at 08:27:36PM +0000, Alan Third wrote:

> On Sun, Mar 04, 2018 at 09:38:27AM -0800, Aaron Jensen wrote:
> > It appears that (on macOS, at least) when a frame is resized, there is
> > an unsightly flicker. It does not matter if the frame is undecorated or
> > not.
>
> Simpler repro:
>
> (dotimes (n 10)
>   (set-frame-parameter nil 'width (+ 80 n))
>   (sit-for 0.1))
>
It’s the call to SET_FRAME_GARBAGED in EmacsView::updateFrameSize. I
don’t know if it’s needed in this circumstance, but without it it
stops the frame being blanked when resizing with the mouse, which is
unpleasant.

The attached patch appears to fix it without breaking mouse resizing,
but it looks like this comment in windowDidResize also counts for macOS:

   /* In GNUstep, at least currently, it's possible to get a didResize
      without getting a willResize.. therefore we need to act as if we got
      the willResize now */

I honestly don’t see that it makes any difference though.

The root problem is actually that we’re unable to execute redisplay
while the frame is being resized by a mouse. The NS event loop goes
into some ‘modal’ state which we can’t break out of, thus preventing
us from doing anything until it’s done. If that didn’t happen we
wouldn’t need to blank the screen at all.
--
Alan Third

0001-Fix-flicker-when-resizing-frame-on-macOS-bug-30699.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Aaron Jensen
On Sun, Mar 4, 2018 at 1:34 PM, Alan Third <[hidden email]> wrote:
>> Simpler repro:
>>
>> (dotimes (n 10)
>>   (set-frame-parameter nil 'width (+ 80 n))
>>   (sit-for 0.1))
>>

Thank you, that's much easier :)

> The attached patch appears to fix it without breaking mouse resizing,
> but it looks like this comment in windowDidResize also counts for macOS:

This patch appears to fix it for me, it's much nicer, thank you!

I tested it with my keyboard resizing and mouse resizing and all seems
to work well.

Is this too dangerous of a patch to apply to emacs-26? The main case
I'd make for it is these new posframe libraries are really nice, so
it'd be nice for non-HEAD users to be able to use them w/o the
flicker.

Thanks!



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
> From: Aaron Jensen <[hidden email]>
> Date: Sun, 4 Mar 2018 18:06:13 -0800
> Cc: [hidden email]
>
> Is this too dangerous of a patch to apply to emacs-26? The main case
> I'd make for it is these new posframe libraries are really nice, so
> it'd be nice for non-HEAD users to be able to use them w/o the
> flicker.

Not only is this too risky for emacs-26, I believe this change might
cause regressions elsewhere, in the form of leaving portions of the
frame not redrawn when needed.  I suggest you run with this change for
a few weeks and watch for redisplay problems, before concluding it's
okay to install it.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Aaron Jensen
On Sun, Mar 4, 2018 at 7:27 PM, Eli Zaretskii <[hidden email]> wrote:
> Not only is this too risky for emacs-26, I believe this change might
> cause regressions elsewhere, in the form of leaving portions of the
> frame not redrawn when needed.  I suggest you run with this change for
> a few weeks and watch for redisplay problems, before concluding it's
> okay to install it.

Interesting. I'll keep an eye out. Are there particular scenarios you
have in mind that may trigger the issues?



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Aaron Jensen
In reply to this post by Alan Third
On Sun, Mar 4, 2018 at 1:34 PM, Alan Third <[hidden email]> wrote:
> The root problem is actually that we’re unable to execute redisplay
> while the frame is being resized by a mouse. The NS event loop goes
> into some ‘modal’ state which we can’t break out of, thus preventing
> us from doing anything until it’s done. If that didn’t happen we
> wouldn’t need to blank the screen at all.

Is this true on a mac as well? How are other apps like iTerm2 able to
redraw during a resize?

It's a naive question, but is it at all possible to redraw a garbaged
frame w/o a flicker? I know nothing about the drawing code, so I
apologize for the question if it's dumb.

Thanks,

Aaron



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
In reply to this post by Aaron Jensen
> From: Aaron Jensen <[hidden email]>
> Date: Sun, 4 Mar 2018 21:21:54 -0800
> Cc: Alan Third <[hidden email]>, [hidden email]
>
> On Sun, Mar 4, 2018 at 7:27 PM, Eli Zaretskii <[hidden email]> wrote:
> > Not only is this too risky for emacs-26, I believe this change might
> > cause regressions elsewhere, in the form of leaving portions of the
> > frame not redrawn when needed.  I suggest you run with this change for
> > a few weeks and watch for redisplay problems, before concluding it's
> > okay to install it.
>
> Interesting. I'll keep an eye out. Are there particular scenarios you
> have in mind that may trigger the issues?

Not really.  Setting the frame's garbaged flag causes a thorough
redisplay on the next opportunity, so removing that could prevent
redisplay in a variety of situations.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
In reply to this post by Aaron Jensen
> From: Aaron Jensen <[hidden email]>
> Date: Sun, 4 Mar 2018 23:55:50 -0800
> Cc: [hidden email]
>
> It's a naive question, but is it at all possible to redraw a garbaged
> frame w/o a flicker?

AFAIK, no.  Redrawing a garbaged frame involves clearing it and
completely redrawing all of its windows, and that is what you perceive
as flicker.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Aaron Jensen
In reply to this post by Eli Zaretskii
On Mon, Mar 5, 2018 at 8:01 AM, Eli Zaretskii <[hidden email]> wrote:
> Not really.  Setting the frame's garbaged flag causes a thorough
> redisplay on the next opportunity, so removing that could prevent
> redisplay in a variety of situations.

Ok, and because this removes the setting of the frame's garbage flag
from the `updateFrameSize` function and moves it to when it receives
the `windowWillResize` event,  I should only expect to see painting
issues after a frame's size is changed I would imagine.

Does anyone know if there are more ways to change a frame's size than
`set-frame-parameter`, a mouse drag or AppleScript?

> AFAIK, no.  Redrawing a garbaged frame involves clearing it and
> completely redrawing all of its windows, and that is what you perceive
> as flicker.

Thanks, I was thinking about double buffering--painting both the clear
and the next paint on the same buffer before swapping it in, but I'm
sure that's much more simplistic than what is actually happening.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
> From: Aaron Jensen <[hidden email]>
> Date: Mon, 5 Mar 2018 08:21:45 -0800
> Cc: Alan Third <[hidden email]>, [hidden email]
>
> > AFAIK, no.  Redrawing a garbaged frame involves clearing it and
> > completely redrawing all of its windows, and that is what you perceive
> > as flicker.
>
> Thanks, I was thinking about double buffering--painting both the clear
> and the next paint on the same buffer before swapping it in, but I'm
> sure that's much more simplistic than what is actually happening.

We already have double-buffering on X, perhaps it can be implemented
on macOS as well.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
On Mon, Mar 05, 2018 at 08:00:07PM +0200, Eli Zaretskii wrote:

> > From: Aaron Jensen <[hidden email]>
> > Date: Mon, 5 Mar 2018 08:21:45 -0800
> > Cc: Alan Third <[hidden email]>, [hidden email]
> >
> > > AFAIK, no.  Redrawing a garbaged frame involves clearing it and
> > > completely redrawing all of its windows, and that is what you perceive
> > > as flicker.
> >
> > Thanks, I was thinking about double buffering--painting both the clear
> > and the next paint on the same buffer before swapping it in, but I'm
> > sure that's much more simplistic than what is actually happening.
>
> We already have double-buffering on X, perhaps it can be implemented
> on macOS as well.

We could do something similar using NSDisableScreenUpdates and
NSEnableScreenUpdates:

https://developer.apple.com/documentation/appkit/1473676-nsdisablescreenupdates?language=objc

We should be able to wrap it round redisplay. Where would that be
done?
--
Alan Third



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
> Date: Mon, 5 Mar 2018 19:23:31 +0000
> From: Alan Third <[hidden email]>
> Cc: Aaron Jensen <[hidden email]>, [hidden email]
>
> > We already have double-buffering on X, perhaps it can be implemented
> > on macOS as well.
>
> We could do something similar using NSDisableScreenUpdates and
> NSEnableScreenUpdates:
>
> https://developer.apple.com/documentation/appkit/1473676-nsdisablescreenupdates?language=objc
>
> We should be able to wrap it round redisplay. Where would that be
> done?

I don't think I understand the meaning of "wrap it round redisplay" to
answer that.  Is the feature you mention significantly different from
what we use for double-buffering on X?  If not, you can use the same
model.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
On Mon, Mar 05, 2018 at 09:53:37PM +0200, Eli Zaretskii wrote:

> > Date: Mon, 5 Mar 2018 19:23:31 +0000
> > From: Alan Third <[hidden email]>
> > Cc: Aaron Jensen <[hidden email]>, [hidden email]
> >
> > > We already have double-buffering on X, perhaps it can be implemented
> > > on macOS as well.
> >
> > We could do something similar using NSDisableScreenUpdates and
> > NSEnableScreenUpdates:
> >
> > https://developer.apple.com/documentation/appkit/1473676-nsdisablescreenupdates?language=objc
> >
> > We should be able to wrap it round redisplay. Where would that be
> > done?
>
> I don't think I understand the meaning of "wrap it round redisplay" to
> answer that.  Is the feature you mention significantly different from
> what we use for double-buffering on X?  If not, you can use the same
> model.

I don’t know how we handle double buffering on X, but if it’s anything
like my previous experiences of double buffering, this is different.

NS already uses double buffering, the issue here is that we want the
screen blank and subsequent drawing of the frame to appear as one
atomic action, but right now we see them as two actions.

In theory if you call NSDisableScreenUpdates before the blanking of
the frame, then call NSEnableScreenUpdates after drawing the contents
of the frame, both should appear as one action (we don’t see the blank
frame at all).

I’ve tried adding calls to NSDisableScreenUpdates and
NSEnableScreenUpdates in redisplay_internal, just to see if it works,
but I couldn’t get it to work at all: I always saw the blanked frame.
Either these functions don’t work as advertised or there’s something
else going on. It’s quite probable I’ve misunderstood
redisplay_internal.
--
Alan Third



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
In reply to this post by Aaron Jensen
On Sun, Mar 04, 2018 at 11:55:50PM -0800, Aaron Jensen wrote:
> On Sun, Mar 4, 2018 at 1:34 PM, Alan Third <[hidden email]> wrote:
> > The root problem is actually that we’re unable to execute redisplay
> > while the frame is being resized by a mouse. The NS event loop goes
> > into some ‘modal’ state which we can’t break out of, thus preventing
> > us from doing anything until it’s done. If that didn’t happen we
> > wouldn’t need to blank the screen at all.
>
> Is this true on a mac as well? How are other apps like iTerm2 able to
> redraw during a resize?

The short answer is that iTerm2 is a native Cocoa app, written in the
way you should write Cocoa apps. Emacs isn’t.

The long answer is quite complicated. I’m trying to write up a decent
explanation of how the NS port works.

> It's a naive question, but is it at all possible to redraw a garbaged
> frame w/o a flicker? I know nothing about the drawing code, so I
> apologize for the question if it's dumb.

It should be, but I know very little about how Emacs goes about
drawing the frame contents, so I won’t say definitely.
--
Alan Third



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
In reply to this post by Alan Third
> Date: Tue, 6 Mar 2018 22:55:02 +0000
> From: Alan Third <[hidden email]>
> Cc: [hidden email], [hidden email]
>
> In theory if you call NSDisableScreenUpdates before the blanking of
> the frame, then call NSEnableScreenUpdates after drawing the contents
> of the frame, both should appear as one action (we don’t see the blank
> frame at all).

Where does the frame blanking happen in the NS build?

> I’ve tried adding calls to NSDisableScreenUpdates and
> NSEnableScreenUpdates in redisplay_internal, just to see if it works,
> but I couldn’t get it to work at all: I always saw the blanked frame.
> Either these functions don’t work as advertised or there’s something
> else going on. It’s quite probable I’ve misunderstood
> redisplay_internal.

If you tell me where did you try to add these calls and perhaps also
what was your mental model of what redisplay_internal does when you
did that, I might be able to help you add this in the right places
(assuming the idea is workable, and I trust your expertise on that).



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
In reply to this post by Alan Third
> Date: Tue, 6 Mar 2018 23:00:40 +0000
> From: Alan Third <[hidden email]>
> Cc: [hidden email]
>
> I know very little about how Emacs goes about drawing the frame
> contents

Feel free to ask me questions.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
In reply to this post by Eli Zaretskii
On Wed, Mar 07, 2018 at 07:26:01PM +0200, Eli Zaretskii wrote:

> > I’ve tried adding calls to NSDisableScreenUpdates and
> > NSEnableScreenUpdates in redisplay_internal, just to see if it works,
> > but I couldn’t get it to work at all: I always saw the blanked frame.
> > Either these functions don’t work as advertised or there’s something
> > else going on. It’s quite probable I’ve misunderstood
> > redisplay_internal.
>
> If you tell me where did you try to add these calls and perhaps also
> what was your mental model of what redisplay_internal does when you
> did that, I might be able to help you add this in the right places
> (assuming the idea is workable, and I trust your expertise on that).

updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to
just flag the frame for clearing.

My assumption was that redisplay first checks if the frame is garbaged
and if so clears it, then redraws the contents of the frame.

I put the calls to NS(En|Dis)ableScreenUpdates at the start and end of
redisplay_internal:

modified   src/xdisp.c
@@ -13868,7 +13868,7 @@ redisplay_internal (void)
   redisplaying_p = true;
   block_buffer_flips ();
   specbind (Qinhibit_free_realized_faces, Qnil);
-
+  ns_disable_screen_updates ();
   /* Record this function, so it appears on the profiler's backtraces.  */
   record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0);
 
@@ -14602,7 +14602,7 @@ redisplay_internal (void)
 #endif
   if (interrupt_input && interrupts_deferred)
     request_sigio ();
-
+  ns_enable_screen_updates ();
   unbind_to (count, Qnil);
   RESUME_POLLING;
 }

I realise this isn’t robust, but I was just testing it out.

I imagine my failure here is that ns_clear_frame isn’t called from
redisplay at all, but somewhere else.
--
Alan Third



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Eli Zaretskii
> Date: Wed, 7 Mar 2018 20:26:03 +0000
> From: Alan Third <[hidden email]>
> Cc: [hidden email], [hidden email]
>
> updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to
> just flag the frame for clearing.
>
> My assumption was that redisplay first checks if the frame is garbaged
> and if so clears it, then redraws the contents of the frame.
>
> I put the calls to NS(En|Dis)ableScreenUpdates at the start and end of
> redisplay_internal:
>
> modified   src/xdisp.c
> @@ -13868,7 +13868,7 @@ redisplay_internal (void)
>    redisplaying_p = true;
>    block_buffer_flips ();
>    specbind (Qinhibit_free_realized_faces, Qnil);
> -
> +  ns_disable_screen_updates ();
>    /* Record this function, so it appears on the profiler's backtraces.  */
>    record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0);
>  
> @@ -14602,7 +14602,7 @@ redisplay_internal (void)
>  #endif
>    if (interrupt_input && interrupts_deferred)
>      request_sigio ();
> -
> +  ns_enable_screen_updates ();
>    unbind_to (count, Qnil);
>    RESUME_POLLING;
>  }
>
> I realise this isn’t robust, but I was just testing it out.
>
> I imagine my failure here is that ns_clear_frame isn’t called from
> redisplay at all, but somewhere else.

I believe it is called from clear_frame, which is called by
redraw_frame, which in turn is called by redraw_garbaged_frames.

The call to ns_enable_screen_updates is too late, I think: you must
enable screen updates before redisplay_internal calls update_frame,
because that's where we actually draw stuff on the screen.



Reply | Threaded
Open this post in threaded view
|

bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized

Alan Third
On Thu, Mar 08, 2018 at 09:15:37PM +0200, Eli Zaretskii wrote:
> > Date: Wed, 7 Mar 2018 20:26:03 +0000
> > From: Alan Third <[hidden email]>
> > Cc: [hidden email], [hidden email]
> >
> > updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to
> > just flag the frame for clearing.

I *finally* worked out what’s going on here.

After updateFrameSize is called we end up in x_set_window_size:

    [window setFrame: wr display: YES];

That resizes and blanks the frame, then asks it to redraw, which takes
us, eventually, to drawRect, which does:

    ns_clear_frame_area (emacsframe, x, y, width, height);
    block_input ();
    expose_frame (emacsframe, x, y, width, height);
    unblock_input ();

ns_clear_frame_area does nothing here because the frame is already
blank, and expose_frame doesn’t redraw anything because the first
thing it does is:

    /* No need to redraw if frame will be redrawn soon.  */
    if (FRAME_GARBAGED_P (f))
      {
        TRACE ((stderr, " garbaged\n"));
        return;
      }

SO, I think that the SET_GARBAGED_FRAME call in updateFrameSize is
premature, which probably means my original patch is (surprisingly)
the correct fix. Possibly with the addition of SET_GARBAGED_FRAME
after the call to setFrame in x_set_window_size, although it makes no
obvious difference here.
--
Alan Third



123