]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
authorYuuki Harano <masm+github@masm11.me>
Wed, 10 Nov 2021 15:39:53 +0000 (00:39 +0900)
committerYuuki Harano <masm+github@masm11.me>
Wed, 10 Nov 2021 15:39:53 +0000 (00:39 +0900)
38 files changed:
1  2 
.gitignore
Makefile.in
configure.ac
lib-src/emacsclient.c
lisp/cus-edit.el
lisp/faces.el
lisp/frame.el
lisp/international/mule-cmds.el
lisp/loadup.el
lisp/menu-bar.el
lisp/mwheel.el
lisp/net/browse-url.el
lisp/net/eww.el
lisp/select.el
lisp/server.el
lisp/simple.el
lisp/startup.el
lisp/url/url-privacy.el
src/Makefile.in
src/alloc.c
src/atimer.c
src/dispextern.h
src/dispnew.c
src/emacs.c
src/font.c
src/font.h
src/frame.c
src/frame.h
src/fringe.c
src/gtkutil.c
src/image.c
src/keyboard.c
src/menu.c
src/process.c
src/termhooks.h
src/xdisp.c
src/xfaces.c
src/xwidget.c

diff --cc .gitignore
Simple merge
diff --cc Makefile.in
Simple merge
diff --cc configure.ac
index 6ebb9667004c729f3d5a9f1f6220ceb70ae6390e,33e7037afe2d02dbfe13e172ad2751fa0d3100ff..a19d752c1ce9a5e8a0ebdf2971340025b8114810
@@@ -2595,8 -2590,30 +2602,30 @@@ if test "${HAVE_X11}" = "yes" || test "
    fi
  fi
  
+ ### Use -lwebp if available, unless '--with-webp=no'
+ HAVE_WEBP=no
+ if test "${with_webp}" != "no"; then
+    if test "${HAVE_X11}" = "yes" || test "${opsys}" = "mingw32" \
+    || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes"; then
+       WEBP_REQUIRED=0.6.0
+       WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
+       EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
+       AC_SUBST(WEBP_CFLAGS)
+       AC_SUBST(WEBP_LIBS)
+    fi
+    if test $HAVE_WEBP = yes; then
+       AC_DEFINE(HAVE_WEBP, 1, [Define to 1 if using libwebp.])
+       CFLAGS="$CFLAGS $WEBP_CFLAGS"
+       # Windows loads libwebp dynamically
+       if test "${opsys}" = "mingw32"; then
+       WEBP_LIBS=
+       fi
+    fi
+ fi
  HAVE_IMAGEMAGICK=no
 -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then
 +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${window_system}" = "pgtk" || test "${HAVE_W32}" = "yes"; then
    if test "${with_imagemagick}" != "no"; then
      if test -n "$BREW"; then
        # Homebrew doesn't link ImageMagick 6 by default, so make sure
@@@ -5915,9 -5915,9 +5989,9 @@@ optsep
  emacs_config_features=
  for opt in ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
   HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
 - M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PNG RSVG SECCOMP \
 + M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PGTK PNG RSVG SECCOMP \
-  SOUND THREADS TIFF \
-  TOOLKIT_SCROLL_BARS UNEXEC X11 XAW3D XDBE XFT XIM XPM XWIDGETS X_TOOLKIT \
+  SOUND THREADS TIFF TOOLKIT_SCROLL_BARS \
+  UNEXEC WEBP X11 XAW3D XDBE XFT XIM XPM XWIDGETS X_TOOLKIT \
   ZLIB; do
  
      case $opt in
Simple merge
Simple merge
diff --cc lisp/faces.el
Simple merge
diff --cc lisp/frame.el
Simple merge
Simple merge
diff --cc lisp/loadup.el
Simple merge
Simple merge
diff --cc lisp/mwheel.el
index 4146b073c434120ea9357dcafb79d2bc7d0fe755,51410e3ef4c013e56201d776d5d889102ab6647a..cb1997801b6e11667e11ad407c8e841179723df1
  
  (defun mouse-wheel-change-button (var button)
    (set-default var button)
-   ;; Sync the bindings.
-   (when (bound-and-true-p mouse-wheel-mode) (mouse-wheel-mode 1)))
+   ;; Sync the bindings if they're already setup.
+   (when (and mouse-wheel--installed-bindings-alist
+              (bound-and-true-p mouse-wheel-mode))
+     (mouse-wheel-mode 1)))
  
  (defcustom mouse-wheel-down-event
 -  (if (or (featurep 'w32-win) (featurep 'ns-win))
 +  (if (or (featurep 'w32-win) (featurep 'ns-win) (featurep 'pgtk))
        'wheel-up
      'mouse-4)
    "Event used for scrolling down."
Simple merge
diff --cc lisp/net/eww.el
index 5f97027aae4feee3b91b448530f7c0c2c84c88ff,70ebc1d2ec6f07eb8fb7b277e5c8d70260f9cac8..46e211171e6da8de41885c52e6bbe610f6209a7b
@@@ -195,8 -231,15 +231,15 @@@ See also `eww-form-checkbox-selected-sy
                   (const "☐")            ; Unicode BALLOT BOX
                   string))
  
+ (defcustom eww-url-transformers '(eww-remove-tracking)
+   "This is a list of transforming functions applied to an URL before usage.
+ The functions will be called with the URL as the single
+ parameter, and should return the (possibly) transformed URL."
+   :type '(repeat function)
+   :version "29.1")
  (defface eww-form-submit
 -  '((((type x w32 ns) (class color))  ; Like default mode line
 +  '((((type x w32 ns pgtk) (class color))     ; Like default mode line
       :box (:line-width 2 :style released-button)
       :background "#808080" :foreground "black"))
    "Face for eww buffer buttons."
diff --cc lisp/select.el
Simple merge
diff --cc lisp/server.el
Simple merge
diff --cc lisp/simple.el
Simple merge
diff --cc lisp/startup.el
Simple merge
Simple merge
diff --cc src/Makefile.in
Simple merge
diff --cc src/alloc.c
Simple merge
diff --cc src/atimer.c
index d12eb4ad1ea768569afe73306df37e20a8c9bd38,490c21bff16f93f200a074cf61b33686c541bc6b..197b504bf51f52c8c55e08511b374874911a8451
@@@ -309,13 -310,11 +310,14 @@@ set_alarm (void
          ispec.it_value = atimers->expiration;
          ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0;
  # ifdef HAVE_TIMERFD
-         if (timerfd >= 0) {
-           if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
-               {
-                 add_timer_wait_descriptor (timerfd);
-                 return;
-               }
-         }
 -        if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
++        if (timerfd >= 0)
+           {
 -            add_timer_wait_descriptor (timerfd);
 -            exit = true;
++            if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
++              {
++                add_timer_wait_descriptor (timerfd);
++                exit = true;
++              }
+           }
  # endif
          if (alarm_timer_ok
              && timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0) == 0)
Simple merge
diff --cc src/dispnew.c
Simple merge
diff --cc src/emacs.c
index 7fd004973d95016b5c2ab0dda7198c84ccc14deb,032b27fcf3ca6a8a064857bc0884dff55d94c58f..925f167d5fa9e1f034b2168c579be7d2cca27322
@@@ -1844,10 -1872,6 +1872,9 @@@ Using an Emacs configured with --with-x
    init_bignum ();
    init_threads ();
    init_eval ();
-   init_atimer ();
 +#ifdef HAVE_PGTK
 +  init_pgtkterm ();   /* before init_atimer(). */
 +#endif
    running_asynch_code = 0;
    init_random ();
  
diff --cc src/font.c
Simple merge
diff --cc src/font.h
Simple merge
diff --cc src/frame.c
Simple merge
diff --cc src/frame.h
Simple merge
diff --cc src/fringe.c
Simple merge
diff --cc src/gtkutil.c
Simple merge
diff --cc src/image.c
index 7a6f406e76f6c53b1fe19dab04e6463614f70ae9,6769e491202b01d23a79cadc12c14794cdeb33f7..f911da51eaaa70373470d19ba79541c745b40f6e
@@@ -10858,9 -11015,13 +11155,13 @@@ static struct image_type const image_ty
   { SYMBOL_INDEX (Qjpeg), jpeg_image_p, jpeg_load, image_clear_image,
     IMAGE_TYPE_INIT (init_jpeg_functions) },
  #endif
 -#if defined HAVE_XPM || defined HAVE_NS
 +#if defined HAVE_XPM || defined HAVE_NS || defined USE_CAIRO
   { SYMBOL_INDEX (Qxpm), xpm_image_p, xpm_load, image_clear_image,
     IMAGE_TYPE_INIT (init_xpm_functions) },
+ #endif
+ #if defined HAVE_WEBP
+  { SYMBOL_INDEX (Qwebp), webp_image_p, webp_load, image_clear_image,
+    IMAGE_TYPE_INIT (init_webp_functions) },
  #endif
   { SYMBOL_INDEX (Qxbm), xbm_image_p, xbm_load, image_clear_image },
   { SYMBOL_INDEX (Qpbm), pbm_image_p, pbm_load, image_clear_image },
diff --cc src/keyboard.c
Simple merge
diff --cc src/menu.c
Simple merge
diff --cc src/process.c
Simple merge
diff --cc src/termhooks.h
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xfaces.c
Simple merge
diff --cc src/xwidget.c
index ce55af8a4b48d0695b7ae38fc1a5d2168b66cefe,2ae635092d6ea9e0d1f227df2cf14b9ae76627d1..6e2e8a9270eeb2978216b9584848ef4f5a3efbb5
@@@ -971,15 -1867,12 +1871,13 @@@ DEFUN ("xwidget-resize", Fxwidget_resiz
  #ifdef USE_GTK
    if (xw->widget_osr)
      {
 +#ifndef HAVE_PGTK
        gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width,
                           xw->height);
- #else
-       gtk_container_check_resize (GTK_CONTAINER (xw->widgetwindow_osr));
- #endif
-       gtk_container_resize_children (GTK_CONTAINER (xw->widgetwindow_osr));
        gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,
                                     xw->height);
+       gtk_widget_queue_allocate (GTK_WIDGET (xw->widget_osr));
      }
  #elif defined NS_IMPL_COCOA
    nsxwidget_resize (xw);