From: Yuuki Harano Date: Wed, 10 Nov 2021 15:39:53 +0000 (+0900) Subject: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk X-Git-Tag: emacs-29.0.90~3671 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4dd1f56f29fc598a8339a345c2f8945250600602;p=emacs.git Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk --- 4dd1f56f29fc598a8339a345c2f8945250600602 diff --cc configure.ac index 6ebb9667004,33e7037afe2..a19d752c1ce --- a/configure.ac +++ b/configure.ac @@@ -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 diff --cc lisp/mwheel.el index 4146b073c43,51410e3ef4c..cb1997801b6 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@@ -47,11 -49,13 +49,13 @@@ (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." diff --cc lisp/net/eww.el index 5f97027aae4,70ebc1d2ec6..46e211171e6 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@@ -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 src/atimer.c index d12eb4ad1ea,490c21bff16..197b504bf51 --- a/src/atimer.c +++ b/src/atimer.c @@@ -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) diff --cc src/emacs.c index 7fd004973d9,032b27fcf3c..925f167d5fa --- a/src/emacs.c +++ b/src/emacs.c @@@ -1844,10 -1872,6 +1872,9 @@@ Using an Emacs configured with --with-x init_bignum (); init_threads (); init_eval (); +#ifdef HAVE_PGTK + init_pgtkterm (); /* before init_atimer(). */ +#endif - init_atimer (); running_asynch_code = 0; init_random (); diff --cc src/image.c index 7a6f406e76f,6769e491202..f911da51eaa --- a/src/image.c +++ b/src/image.c @@@ -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/xwidget.c index ce55af8a4b4,2ae635092d6..6e2e8a9270e --- a/src/xwidget.c +++ b/src/xwidget.c @@@ -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);