commit 3447f365b13e0814916e44192063734eae7d3e19 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Tue Mar 1 15:49:03 2022 +0800 ; * src/xwidget.c: Add missing part of last change. diff --git a/src/xwidget.c b/src/xwidget.c index e812b13f23..71bc350429 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -1443,7 +1443,7 @@ xwidget_scroll (struct xwidget_view *view, double x, double y, gdk_event_free (xg_event); } -#ifdef HAVE_USABLE_XI_GESTURE_PINCH_EVENT +#ifdef HAVE_XINPUT2_4 void xwidget_pinch (struct xwidget_view *view, XIGesturePinchEvent *xev) { commit 6654dfc83cfcf15557054ea4d1ed41d9f87aa61b Author: Po Lu Date: Tue Mar 1 15:45:50 2022 +0800 * src/xwidget.h: Fix build with XI 2.4. diff --git a/src/xwidget.h b/src/xwidget.h index be1460ede5..502beb6765 100644 --- a/src/xwidget.h +++ b/src/xwidget.h @@ -223,7 +223,7 @@ extern void xwidget_motion_notify (struct xwidget_view *, double, double, double, double, uint, Time); extern void xwidget_scroll (struct xwidget_view *, double, double, double, double, uint, Time, bool); -#ifdef HAVE_USABLE_XI_GESTURE_PINCH_EVENT +#ifdef HAVE_XINPUT2_4 extern void xwidget_pinch (struct xwidget_view *, XIGesturePinchEvent *); #endif #endif commit dd71222208324a1c6dad3ad42e3c73645ceb94f5 Author: Po Lu Date: Tue Mar 1 15:38:37 2022 +0800 Make precision scrolling on top of the tool bar work * lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Bind some more events. (pixel-scroll-precision): (pixel-scroll-start-momentum): If window is a frame, use its selected window. diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 042c8a419e..bfe48ef1f9 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -129,6 +129,9 @@ is always with pixel resolution.") (define-key map [vertical-scroll-bar wheel-down] 'pixel-scroll-precision) (define-key map [vertical-scroll-bar wheel-up] 'pixel-scroll-precision) (define-key map [vertical-scroll-bar touch-end] 'pixel-scroll-start-momentum) + (define-key map [tool-bar wheel-down] 'pixel-scroll-precision) + (define-key map [tool-bar wheel-up] 'pixel-scroll-precision) + (define-key map [tool-bar touch-end] 'pixel-scroll-start-momentum) (define-key map [left-margin wheel-down] 'pixel-scroll-precision) (define-key map [left-margin wheel-up] 'pixel-scroll-precision) (define-key map [left-margin touch-end] 'pixel-scroll-start-momentum) @@ -669,6 +672,8 @@ wheel." (interactive "e") (let ((window (mwheel-event-window event)) (current-window (selected-window))) + (when (framep window) + (setq window (frame-selected-window window))) (if (and (nth 4 event)) (let ((delta (round (cdr (nth 4 event))))) (unless (zerop delta) @@ -742,6 +747,8 @@ It is a vector of the form [ VELOCITY TIME SIGN ]." (when pixel-scroll-precision-use-momentum (let ((window (mwheel-event-window event)) (state nil)) + (when (framep window) + (setq window (frame-selected-window window))) (setq state (pixel-scroll-kinetic-state window)) (when (and (aref state 1) (listp (aref state 0))) commit 54474a6db2bccdfe862307bf343af44ab3c79829 Author: Po Lu Date: Tue Mar 1 14:59:32 2022 +0800 Avoid duplicate wheel and button events on non-toolkit scroll bars * src/xterm.c (x_scroll_bar_create): Set appropriate input extension event mask. (handle_one_xevent): Move some ifdefs around and handle input extension button events on scroll bars. diff --git a/src/xterm.c b/src/xterm.c index 3e35ae50b8..ec17203fcd 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8489,6 +8489,30 @@ x_scroll_bar_create (struct window *w, int top, int left, CopyFromParent, /* Attributes. */ mask, &a); + +#ifdef HAVE_XINPUT2 + /* Ask for input extension button and motion events. This lets us + send the proper `wheel-up' or `wheel-down' events to Emacs. */ + if (FRAME_DISPLAY_INFO (f)->supports_xi2) + { + XIEventMask mask; + ptrdiff_t l = XIMaskLen (XI_LASTEVENT); + unsigned char *m; + + mask.mask = m = alloca (l); + memset (m, 0, l); + mask.mask_len = l; + + mask.deviceid = XIAllMasterDevices; + XISetMask (m, XI_ButtonPress); + XISetMask (m, XI_ButtonRelease); + XISetMask (m, XI_Motion); + XISetMask (m, XI_Enter); + XISetMask (m, XI_Leave); + + XISelectEvents (FRAME_X_DISPLAY (f), window, &mask, 1); + } +#endif bar->x_window = window; } #endif /* not USE_TOOLKIT_SCROLL_BARS */ @@ -11725,7 +11749,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!f) { -#if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS +#if defined USE_MOTIF || !defined USE_TOOLKIT_SCROLL_BARS struct scroll_bar *bar = x_window_to_scroll_bar (xi_event->display, xev->event, 2); @@ -12207,6 +12231,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, xembed_send_message (f, xev->time, XEMBED_REQUEST_FOCUS, 0, 0, 0); } +#ifndef USE_TOOLKIT_SCROLL_BARS + else + { + struct scroll_bar *bar + = x_window_to_scroll_bar (dpyinfo->display, + xev->event, 2); + + if (bar) + x_scroll_bar_handle_click (bar, (XEvent *) &bv, &inev.ie); + } +#endif if (xev->evtype == XI_ButtonPress) { commit db9b9435cddb1201bc57c65f44f90208e7047582 Author: Po Lu Date: Tue Mar 1 14:44:02 2022 +0800 Fix old X menu on builds with XI2 * oldXMenu/Activate.c (XMenuActivateSetTranslateFunction): New function. (XMenuActivate): Handle generic events. * oldXMenu/XMenu.h: New prototypes. (Translate_func): New type. * src/xmenu.c (x_menu_wait_translate_generic_event): New function. (x_menu_show): Set translate function. diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c index 646631df84..447b7398ca 100644 --- a/oldXMenu/Activate.c +++ b/oldXMenu/Activate.c @@ -121,6 +121,7 @@ int x_menu_grab_keyboard = 1; static Wait_func wait_func; static void* wait_data; +static Translate_func translate_func = NULL; void XMenuActivateSetWaitFunction (Wait_func func, void *data) @@ -129,6 +130,12 @@ XMenuActivateSetWaitFunction (Wait_func func, void *data) wait_data = data; } +void +XMenuActivateSetTranslateFunction (Translate_func func) +{ + translate_func = func; +} + int XMenuActivate( register Display *display, /* Display to put menu on. */ @@ -515,6 +522,12 @@ XMenuActivate( feq = feq_tmp; } else if (_XMEventHandler) (*_XMEventHandler)(&event); + break; +#ifdef HAVE_XINPUT2 + case GenericEvent: + if (translate_func) + translate_func (&event); +#endif } /* * If a selection has been made, break out of the event loop. diff --git a/oldXMenu/XMenu.h b/oldXMenu/XMenu.h index 50ea683409..2eee18a384 100644 --- a/oldXMenu/XMenu.h +++ b/oldXMenu/XMenu.h @@ -255,6 +255,11 @@ typedef struct _xmenu { typedef void (*Wait_func)(void*); +/* Function for translating GenericEvents. It is should call + XPutBackEvent on an equivalent artificial core event on any + function it wants to translate. */ +typedef void (*Translate_func)(XEvent *); + /* * XMenu library routine declarations. */ @@ -274,6 +279,7 @@ void XMenuEventHandler(int (*handler) (XEvent *)); int XMenuLocate(Display *display, XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height); void XMenuSetFreeze(XMenu *menu, int freeze); void XMenuActivateSetWaitFunction(Wait_func func, void *data); +void XMenuActivateSetTranslateFunction(Translate_func func); int XMenuActivate(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, unsigned int event_mask, char **data, void (*help_callback) (char const *, int, int)); char *XMenuPost(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, int event_mask); int XMenuDeletePane(Display *display, XMenu *menu, int p_num); diff --git a/src/xmenu.c b/src/xmenu.c index e483c8f73b..fb80221e15 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -222,6 +222,64 @@ x_menu_wait_for_event (void *data) #endif } } + +#if !defined USE_GTK && !defined USE_X_TOOLKIT && defined HAVE_XINPUT2 +static void +x_menu_translate_generic_event (XEvent *event) +{ + struct x_display_info *dpyinfo; + XEvent copy; + XIDeviceEvent *xev; + + dpyinfo = x_display_info_for_display (event->xgeneric.display); + + if (event->xgeneric.extension == dpyinfo->xi2_opcode) + { + eassert (!event->xcookie.data); + + if (XGetEventData (dpyinfo->display, &event->xcookie)) + { + switch (event->xcookie.evtype) + { + case XI_ButtonPress: + case XI_ButtonRelease: + xev = (XIDeviceEvent *) event->xcookie.data; + copy.xbutton.type = (event->xcookie.evtype == XI_ButtonPress + ? ButtonPress : ButtonRelease); + copy.xbutton.serial = xev->serial; + copy.xbutton.send_event = xev->send_event; + copy.xbutton.display = dpyinfo->display; + copy.xbutton.window = xev->event; + copy.xbutton.root = xev->root; + copy.xbutton.subwindow = xev->child; + copy.xbutton.time = xev->time; + copy.xbutton.x = lrint (xev->event_x); + copy.xbutton.y = lrint (xev->event_y); + copy.xbutton.x_root = lrint (xev->root_x); + copy.xbutton.y_root = lrint (xev->root_y); + copy.xbutton.state = xev->mods.effective; + copy.xbutton.button = xev->detail; + copy.xbutton.same_screen = True; + + if (xev->buttons.mask_len) + { + if (XIMaskIsSet (xev->buttons.mask, 1)) + copy.xbutton.state |= Button1Mask; + if (XIMaskIsSet (xev->buttons.mask, 2)) + copy.xbutton.state |= Button2Mask; + if (XIMaskIsSet (xev->buttons.mask, 3)) + copy.xbutton.state |= Button3Mask; + } + + XPutBackEvent (dpyinfo->display, ©); + + break; + } + XFreeEventData (dpyinfo->display, &event->xcookie); + } + } +} +#endif #endif /* ! MSDOS */ @@ -2568,6 +2626,9 @@ x_menu_show (struct frame *f, int x, int y, int menuflags, #ifndef MSDOS XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f)); +#ifdef HAVE_XINPUT2 + XMenuActivateSetTranslateFunction (x_menu_translate_generic_event); +#endif #endif record_unwind_protect_ptr (pop_down_menu, commit 6b8808ab8ce21e9367e0dd930d4d074e5b21ff6b Author: Po Lu Date: Tue Mar 1 14:06:52 2022 +0800 Disable some code that interferes with menus on Lucid * src/xmenu.c (create_and_show_popup_menu) (server_timestamp_predicate): Disable timestamp code on builds using the Lucid menu bar widget. diff --git a/src/xmenu.c b/src/xmenu.c index a8185d8346..e483c8f73b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1514,7 +1514,7 @@ pop_down_menu (int id) popup_activated_flag = 0; } -#ifdef HAVE_XINPUT2 +#if defined HAVE_XINPUT2 && defined USE_MOTIF static Bool server_timestamp_predicate (Display *display, XEvent *xevent, @@ -1546,7 +1546,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, LWLIB_ID menu_id; Widget menu; Window dummy_window; -#ifdef HAVE_XINPUT2 +#if defined HAVE_XINPUT2 && defined USE_MOTIF XEvent property_dummy; Atom property_atom; #endif @@ -1643,6 +1643,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, #endif } +#ifdef USE_MOTIF if (dpyinfo->supports_xi2) { /* Dispatch a PropertyNotify to Xt with the current server time. @@ -1661,6 +1662,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, XtDispatchEvent (&property_dummy); } +#endif if (dpyinfo->supports_xi2) XUngrabServer (dpyinfo->display); commit cd44d45d92964b574c567b3f083f32d417120249 Merge: 6874011721 6dbc3da205 Author: Stefan Kangas Date: Tue Mar 1 07:05:15 2022 +0100 Merge from origin/emacs-28 6dbc3da205 Fix :tag for eol in tab-first-completion commit 68740117211a104ffd59b570aa40d1b5cfcef93e Author: Po Lu Date: Tue Mar 1 13:48:36 2022 +0800 Fix C-g inside toolkit file dialogs with XI2 * src/xfns.c (Fx_file_dialog): Handle GenericEvents when looking for quit character. * src/xmenu.c (x_menu_wait_for_event): If data is non-nil, use XPending. diff --git a/src/xfns.c b/src/xfns.c index 03adb5ab8d..65218b3fc0 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -8381,20 +8381,84 @@ DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, result = 0; while (result == 0) { - XEvent event; + XEvent event, copy; +#ifdef HAVE_XINPUT2 + x_menu_wait_for_event (FRAME_X_DISPLAY (f)); +#else x_menu_wait_for_event (0); - XtAppNextEvent (Xt_app_con, &event); - if (event.type == KeyPress - && FRAME_X_DISPLAY (f) == event.xkey.display) - { - KeySym keysym = XLookupKeysym (&event.xkey, 0); +#endif - /* Pop down on C-g. */ - if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) - XtUnmanageChild (dialog); - } + if ( +#ifndef HAVE_XINPUT2 + XtAppPending (Xt_app_con) +#else + XPending (FRAME_X_DISPLAY (f)) +#endif + ) + { +#ifndef HAVE_XINPUT2 + XtAppNextEvent (Xt_app_con, &event); +#else + XNextEvent (FRAME_X_DISPLAY (f), &event); +#endif + + copy = event; + if (event.type == KeyPress + && FRAME_X_DISPLAY (f) == event.xkey.display) + { + KeySym keysym = XLookupKeysym (&event.xkey, 0); - (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); + /* Pop down on C-g. */ + if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) + XtUnmanageChild (dialog); + } +#ifdef HAVE_XINPUT2 + else if (event.type == GenericEvent + && FRAME_X_DISPLAY (f) == event.xgeneric.display + && FRAME_DISPLAY_INFO (f)->supports_xi2 + && (event.xgeneric.extension + == FRAME_DISPLAY_INFO (f)->xi2_opcode) + && event.xgeneric.evtype == XI_KeyPress) + { + KeySym keysym; + XIDeviceEvent *xev; + + if (event.xcookie.data) + emacs_abort (); + + if (XGetEventData (FRAME_X_DISPLAY (f), &event.xcookie)) + { + xev = (XIDeviceEvent *) event.xcookie.data; + + copy.xkey.type = KeyPress; + copy.xkey.serial = xev->serial; + copy.xkey.send_event = xev->send_event; + copy.xkey.display = FRAME_X_DISPLAY (f); + copy.xkey.window = xev->event; + copy.xkey.root = xev->root; + copy.xkey.subwindow = xev->child; + copy.xkey.time = xev->time; + copy.xkey.x = lrint (xev->event_x); + copy.xkey.y = lrint (xev->event_y); + copy.xkey.x_root = lrint (xev->root_x); + copy.xkey.y_root = lrint (xev->root_y); + copy.xkey.state = xev->mods.effective; + copy.xkey.keycode = xev->detail; + copy.xkey.same_screen = True; + + keysym = XLookupKeysym (©.xkey, 0); + + if (keysym == XK_g + && (copy.xkey.state & ControlMask) != 0) /* Any escape, ignore modifiers. */ + XtUnmanageChild (dialog); + + XFreeEventData (FRAME_X_DISPLAY (f), &event.xcookie); + } + } +#endif + + (void) x_dispatch_event (©, FRAME_X_DISPLAY (f)); + } } /* Get the result. */ diff --git a/src/xmenu.c b/src/xmenu.c index 4683e856c2..a8185d8346 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -184,8 +184,8 @@ x_menu_wait_for_event (void *data) instead of the small ifdefs below. */ while ( -#ifdef USE_X_TOOLKIT - ! XtAppPending (Xt_app_con) +#if defined USE_X_TOOLKIT + ! (data ? XPending (data) : XtAppPending (Xt_app_con)) #elif defined USE_GTK ! gtk_events_pending () #else commit dfb52654a2a636183d0c5fada0ff28ec2d03872f Author: Stefan Kangas Date: Tue Mar 1 06:04:06 2022 +0100 Update publicsuffix.txt from upstream * etc/publicsuffix.txt: Update from https://publicsuffix.org/list/public_suffix_list.dat dated 2022-02-28 02:58:30 UTC. diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt index c67235fae0..3cf06f92bb 100644 --- a/etc/publicsuffix.txt +++ b/etc/publicsuffix.txt @@ -9,7 +9,7 @@ // ===BEGIN ICANN DOMAINS=== -// ac : https://en.wikipedia.org/wiki/.ac +// ac : http://nic.ac/rules.htm ac com.ac edu.ac @@ -865,6 +865,7 @@ gov.cx // cy : http://www.nic.cy/ // Submitted by registry Panayiotou Fotia +// namespace policies URL https://www.nic.cy/portal//sites/default/files/symfonia_gia_eggrafi.pdf cy ac.cy biz.cy @@ -872,10 +873,9 @@ com.cy ekloges.cy gov.cy ltd.cy -name.cy +mil.cy net.cy org.cy -parliament.cy press.cy pro.cy tm.cy @@ -1366,7 +1366,7 @@ info int eu.int -// io : http://www.nic.io/rules.html +// io : http://www.nic.io/rules.htm // list of other 2nd level tlds ? io com.io @@ -6036,7 +6036,7 @@ gov.sg edu.sg per.sg -// sh : http://www.nic.sh/registrar.html +// sh : http://nic.sh/rules.htm sh com.sh net.sh @@ -7131,7 +7131,7 @@ org.zw // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2021-12-30T15:13:57Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-02-18T15:13:38Z // This list is auto-generated, don't edit it manually. // aaa : 2015-02-26 American Automobile Association, Inc. aaa @@ -7556,9 +7556,6 @@ brother // brussels : 2014-02-06 DNS.be vzw brussels -// budapest : 2013-11-21 Minds + Machines Group Limited -budapest - // bugatti : 2015-07-23 Bugatti International SA bugatti @@ -7595,7 +7592,7 @@ call // calvinklein : 2015-07-30 PVH gTLD Holdings LLC calvinklein -// cam : 2016-04-21 AC Webconnecting Holding B.V. +// cam : 2016-04-21 Cam Connecting SARL cam // camera : 2013-08-27 Binky Moon, LLC @@ -7868,9 +7865,6 @@ cruise // cruises : 2013-12-05 Binky Moon, LLC cruises -// csc : 2014-09-25 Alliance-One Services, Inc. -csc - // cuisinella : 2014-04-03 SCHMIDT GROUPE S.A.S. cuisinella @@ -10639,6 +10633,10 @@ hlx3.page // Submitted by Przemyslaw Plewa beep.pl +// Aiven: https://aiven.io/ +// Submitted by Etienne Stalmans +aivencloud.com + // alboto.ca : http://alboto.ca // Submitted by Anton Avramov barsy.ca @@ -10811,6 +10809,10 @@ myasustor.com // Submitted by Sam Smyth cdn.prod.atlassian-dev.net +// Authentick UG (haftungsbeschränkt) : https://authentick.net +// Submitted by Lukas Reschke +translated.page + // AVM : https://avm.de // Submitted by Andreas Weise myfritz.net @@ -10864,6 +10866,10 @@ theshop.jp shopselect.net base.shop +// Beget Ltd +// Submitted by Lev Nekrasov +*.beget.app + // BetaInABox // Submitted by Adrian betainabox.com @@ -11240,6 +11246,11 @@ dedyn.io *.rss.my.id *.diher.solutions +// Discord Inc : https://discord.com +// Submitted by Sahn Lam +discordsays.com +discordsez.com + // DNS Africa Ltd https://dns.business // Submitted by Calvin Browne jozi.biz @@ -11964,8 +11975,15 @@ futuremailing.at *.kunden.ortsinfo.at *.statics.cloud -// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains -// Submitted by David Illsley +// GDS : https://www.gov.uk/service-manual/technology/managing-domain-names +// Submitted by Stephen Ford +independent-commission.uk +independent-inquest.uk +independent-inquiry.uk +independent-panel.uk +independent-review.uk +public-inquiry.uk +royal-commission.uk service.gov.uk // CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk @@ -12021,8 +12039,113 @@ co.ro shop.ro // GMO Pepabo, Inc. : https://pepabo.com/ -// Submitted by dojineko +// Submitted by Hosting Div lolipop.io +angry.jp +babyblue.jp +babymilk.jp +backdrop.jp +bambina.jp +bitter.jp +blush.jp +boo.jp +boy.jp +boyfriend.jp +but.jp +candypop.jp +capoo.jp +catfood.jp +cheap.jp +chicappa.jp +chillout.jp +chips.jp +chowder.jp +chu.jp +ciao.jp +cocotte.jp +coolblog.jp +cranky.jp +cutegirl.jp +daa.jp +deca.jp +deci.jp +digick.jp +egoism.jp +fakefur.jp +fem.jp +flier.jp +floppy.jp +fool.jp +frenchkiss.jp +girlfriend.jp +girly.jp +gloomy.jp +gonna.jp +greater.jp +hacca.jp +heavy.jp +her.jp +hiho.jp +hippy.jp +holy.jp +hungry.jp +icurus.jp +itigo.jp +jellybean.jp +kikirara.jp +kill.jp +kilo.jp +kuron.jp +littlestar.jp +lolitapunk.jp +lomo.jp +lovepop.jp +lovesick.jp +main.jp +mods.jp +mond.jp +mongolian.jp +moo.jp +namaste.jp +nikita.jp +nobushi.jp +noor.jp +oops.jp +parallel.jp +parasite.jp +pecori.jp +peewee.jp +penne.jp +pepper.jp +perma.jp +pigboat.jp +pinoko.jp +punyu.jp +pupu.jp +pussycat.jp +pya.jp +raindrop.jp +readymade.jp +sadist.jp +schoolbus.jp +secret.jp +staba.jp +stripper.jp +sub.jp +sunnyday.jp +thick.jp +tonkotsu.jp +under.jp +upper.jp +velvet.jp +verse.jp +versus.jp +vivian.jp +watson.jp +weblike.jp +whitesnow.jp +zombie.jp +heteml.net // GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/ // Submitted by Tom Whitwell @@ -12441,6 +12564,14 @@ js.org kaas.gg khplay.nl +// Kakao : https://www.kakaocorp.com/ +// Submitted by JaeYoong Lee +ktistory.com + +// Kapsi : https://kapsi.fi +// Submitted by Tomi Juntunen +kapsi.fi + // Keyweb AG : https://www.keyweb.de // Submitted by Martin Dannehl keymachine.de @@ -12758,7 +12889,10 @@ noop.app // Northflank Ltd. : https://northflank.com/ // Submitted by Marco Suter *.northflank.app +*.build.run *.code.run +*.database.run +*.migration.run // Noticeable : https://noticeable.io // Submitted by Laurent Pellegrino @@ -12941,6 +13075,10 @@ orsites.com // Submitted by Yngve Pettersen operaunite.com +// Orange : https://www.orange.com +// Submitted by Alexandre Linte +tech.orange + // Oursky Limited : https://authgear.com/, https://skygear.io/ // Submited by Authgear Team , Skygear Developer authgear-staging.com @@ -13050,6 +13188,10 @@ pleskns.com // Submitted by Maximilian Schieder dyn53.io +// Porter : https://porter.run/ +// Submitted by Rudraksh MK +onporter.run + // Positive Codes Technology Company : http://co.bn/faq.html // Submitted by Zulfais co.bn @@ -13211,6 +13353,10 @@ itcouldbewor.se // Submitted by Jennifer Herting git-pages.rit.edu +// Rocky Enterprise Software Foundation : https://resf.org +// Submitted by Neil Hanlon +rocky.page + // Rusnames Limited: http://rusnames.ru/ // Submitted by Sergey Zotov биз.рус @@ -13572,6 +13718,10 @@ lima.zone *.transurl.eu *.transurl.nl +// TransIP: https://www.transip.nl +// Submitted by Cedric Dubois +site.transip.me + // TuxFamily : http://tuxfamily.org // Submitted by TuxFamily administrators tuxfamily.org @@ -13694,19 +13844,14 @@ me.vu // Submitted by Serhii Rostilo v.ua +// Vultr Objects : https://www.vultr.com/products/object-storage/ +// Submitted by Niels Maumenee +*.vultrobjects.com + // Waffle Computer Inc., Ltd. : https://docs.waffleinfo.com // Submitted by Masayuki Note wafflecell.com -// WapBlog.ID : https://www.wapblog.id -// Submitted by Fajar Sodik -idnblogger.com -indowapblog.com -bloger.id -wblog.id -wbq.me -fastblog.net - // WebHare bv: https://www.webhare.com/ // Submitted by Arnold Hendriks *.webhare.dev @@ -13743,6 +13888,10 @@ wmcloud.org panel.gg daemon.panel.gg +// Wizard Zines : https://wizardzines.com +// Submitted by Julia Evans +messwithdns.com + // WoltLab GmbH : https://www.woltlab.com // Submitted by Tim Düsterhus woltlab-demo.com commit 02d3eed6007d9b90e453e24cdd658eb848a0a2d4 Author: Po Lu Date: Tue Mar 1 11:31:37 2022 +0800 Intern server time property during terminal initialization * src/xmenu.c (create_and_show_popup_menu): Use previously interned atom. * src/xterm.c (x_term_init): New atom `EMACS_SERVER_TIME_PROP'. * src/xterm.h (struct x_display_info): New field `Xatom_EMACS_SERVER_TIME_PROP'. diff --git a/src/xmenu.c b/src/xmenu.c index 93bc90514c..4683e856c2 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1650,14 +1650,14 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, processed by Xt, but Xt doesn't consider GenericEvents, so the timestamp is always less than the last grab time. */ - property_atom = XInternAtom (dpyinfo->display, "EMACS_SERVER_TIME_PROP", False); + property_atom = dpyinfo->Xatom_EMACS_SERVER_TIME_PROP; XChangeProperty (dpyinfo->display, FRAME_OUTER_WINDOW (f), property_atom, XA_ATOM, 32, PropModeReplace, (unsigned char *) &property_atom, 1); XIfEvent (dpyinfo->display, &property_dummy, server_timestamp_predicate, - (XPointer) &(XID[]) {(XID) FRAME_OUTER_WINDOW (f), (XID) property_atom}); + (XPointer) &(XID[]) {FRAME_OUTER_WINDOW (f), property_atom}); XtDispatchEvent (&property_dummy); } diff --git a/src/xterm.c b/src/xterm.c index 0e37d3f93b..3e35ae50b8 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17255,6 +17255,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) ATOM_REFS_INIT ("MULTIPLE", Xatom_MULTIPLE) ATOM_REFS_INIT ("INCR", Xatom_INCR) ATOM_REFS_INIT ("_EMACS_TMP_", Xatom_EMACS_TMP) + ATOM_REFS_INIT ("EMACS_SERVER_TIME_PROP", Xatom_EMACS_SERVER_TIME_PROP) ATOM_REFS_INIT ("TARGETS", Xatom_TARGETS) ATOM_REFS_INIT ("NULL", Xatom_NULL) ATOM_REFS_INIT ("ATOM", Xatom_ATOM) diff --git a/src/xterm.h b/src/xterm.h index a41eb43d64..f6c251649f 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -407,7 +407,8 @@ struct x_display_info Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE, Xatom_COMPOUND_TEXT, Xatom_UTF8_STRING, Xatom_MULTIPLE, Xatom_INCR, Xatom_EMACS_TMP, Xatom_TARGETS, Xatom_NULL, - Xatom_ATOM, Xatom_ATOM_PAIR, Xatom_CLIPBOARD_MANAGER, Xatom_COUNTER; + Xatom_ATOM, Xatom_ATOM_PAIR, Xatom_CLIPBOARD_MANAGER, Xatom_COUNTER, + Xatom_EMACS_SERVER_TIME_PROP; /* More atoms for font properties. The last three are private properties, see the comments in src/fontset.h. */ commit 17431ca1ccbbbc41ab812a150872d6704836f169 Author: Po Lu Date: Tue Mar 1 11:30:52 2022 +0800 Fix Motif menu help text in submenus * lwlib/lwlib-Xm.c (xm_arm_callback): (make_menu_in_widget): (update_one_menu_entry): (xm_update_one_widget): (do_call): Pass instance to arm callback and use wv as user data instead of call data. diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 25b1cc6b12..1b8675c0ed 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -269,29 +269,19 @@ static void xm_arm_callback (Widget w, XtPointer client_data, XtPointer call_data) { XmPushButtonCallbackStruct *cbs = (XmPushButtonCallbackStruct *) call_data; - widget_value *wv = (widget_value *) client_data; - widget_instance *instance; - - /* Get the id of the menu bar or popup menu this widget is in. */ - while (w != NULL) - { - if (XmIsRowColumn (w)) - { - unsigned char type = 0xff; - - XtVaGetValues (w, XmNrowColumnType, &type, NULL); - if (type == XmMENU_BAR || type == XmMENU_POPUP) - break; - } + widget_value *wv = NULL; + widget_instance *instance = client_data; + XtPointer user_data; + Arg al[2]; + int ac = 0; - w = XtParent (w); - } + XtSetArg (al[ac], XmNuserData, &user_data); ac++; + XtGetValues (w, al, ac); + wv = user_data; - if (w != NULL) + if (wv != NULL) { - instance = lw_get_widget_instance (w); - - if (instance && instance->info->highlight_cb + if (instance->info->highlight_cb && (cbs->reason == XmCR_DISARM || (cbs->event && (cbs->event->type == EnterNotify @@ -542,7 +532,7 @@ make_menu_in_widget (widget_instance* instance, ac = 0; XtSetArg (al[ac], XmNsensitive, cur->enabled); ac++; XtSetArg (al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; - XtSetArg (al[ac], XmNuserData, cur->call_data); ac++; + XtSetArg (al[ac], XmNuserData, cur); ac++; if (instance->pop_up_p && !cur->contents && !cur->call_data && !lw_separator_p (cur->name, &separator, 1)) @@ -573,14 +563,18 @@ make_menu_in_widget (widget_instance* instance, ? XmN_OF_MANY : XmONE_OF_MANY)); ++ac; button = XmCreateToggleButton (widget, cur->name, al, ac); - XtAddCallback (button, XmNarmCallback, xm_arm_callback, cur); - XtAddCallback (button, XmNdisarmCallback, xm_arm_callback, cur); + XtAddCallback (button, XmNarmCallback, xm_arm_callback, + (XtPointer) instance); + XtAddCallback (button, XmNdisarmCallback, xm_arm_callback, + (XtPointer) instance); } else { button = XmCreatePushButton (widget, cur->name, al, ac); - XtAddCallback (button, XmNarmCallback, xm_arm_callback, cur); - XtAddCallback (button, XmNdisarmCallback, xm_arm_callback, cur); + XtAddCallback (button, XmNarmCallback, xm_arm_callback, + (XtPointer) instance); + XtAddCallback (button, XmNdisarmCallback, xm_arm_callback, + (XtPointer) instance); } xm_update_label (instance, button, cur); @@ -647,7 +641,7 @@ update_one_menu_entry (widget_instance* instance, /* update the sensitivity and userdata */ /* Common to all widget types */ XtSetSensitive (widget, val->enabled); - XtVaSetValues (widget, XmNuserData, val->call_data, NULL); + XtVaSetValues (widget, XmNuserData, val, NULL); /* update the menu button as a label. */ if (val->this_one_change >= VISIBLE_CHANGE) @@ -847,7 +841,7 @@ xm_update_one_widget (widget_instance* instance, /* Common to all widget types */ XtSetSensitive (widget, val->enabled); - XtVaSetValues (widget, XmNuserData, val->call_data, NULL); + XtVaSetValues (widget, XmNuserData, val, NULL); /* Common to all label like widgets */ if (XtIsSubclass (widget, xmLabelWidgetClass)) @@ -1792,6 +1786,7 @@ do_call (Widget widget, int ac; XtPointer user_data; widget_instance* instance = (widget_instance*)closure; + widget_value *wv; Widget instance_widget; LWLIB_ID id; @@ -1809,17 +1804,18 @@ do_call (Widget widget, user_data = NULL; XtSetArg (al [ac], XmNuserData, &user_data); ac++; XtGetValues (widget, al, ac); + wv = user_data; switch (type) { case pre_activate: if (instance->info->pre_activate_cb) - instance->info->pre_activate_cb (widget, id, user_data); + instance->info->pre_activate_cb (widget, id, wv ? wv->call_data : NULL); break; case selection: if (instance->info->selection_cb) - instance->info->selection_cb (widget, id, user_data); + instance->info->selection_cb (widget, id, wv ? wv->call_data : NULL); break; case no_selection: @@ -1829,7 +1825,7 @@ do_call (Widget widget, case post_activate: if (instance->info->post_activate_cb) - instance->info->post_activate_cb (widget, id, user_data); + instance->info->post_activate_cb (widget, id, wv ? wv->call_data : NULL); break; default: commit e05478050ab34633d5adff9e37eed74562ddf98b Author: Po Lu Date: Tue Mar 1 09:00:29 2022 +0800 * src/xterm.c: Explain frame resize synchronization. diff --git a/src/xterm.c b/src/xterm.c index adfd7d2f9e..0e37d3f93b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -340,34 +340,35 @@ along with GNU Emacs. If not, see . */ FRAME RESIZING - In the following explanations "frame size" refers to the "native size" - of a frame as reported by the (frame.h) macros FRAME_PIXEL_WIDTH and - FRAME_PIXEL_HEIGHT. These specify the size of a frame as the values - passed to/received from a toolkit and the window manager. The "text - size" Emacs Lisp code uses in functions like 'set-frame-size' or sees - in the ‘width’ and 'height' frame parameters is only loosely related - to the native size. The necessary translations are provided by the - macros FRAME_TEXT_TO_PIXEL_WIDTH and FRAME_TEXT_TO_PIXEL_HEIGHT as - well as FRAME_PIXEL_TO_TEXT_WIDTH and FRAME_PIXEL_TO_TEXT_HEIGHT (in + In the following explanations "frame size" refers to the "native + size" of a frame as reported by the (frame.h) macros + FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT. These specify the size of + a frame as the values passed to/received from a toolkit and the + window manager. The "text size" Emacs Lisp code uses in functions + like 'set-frame-size' or sees in the ‘width’ and 'height' frame + parameters is only loosely related to the native size. The + necessary translations are provided by the macros + FRAME_TEXT_TO_PIXEL_WIDTH and FRAME_TEXT_TO_PIXEL_HEIGHT as well as + FRAME_PIXEL_TO_TEXT_WIDTH and FRAME_PIXEL_TO_TEXT_HEIGHT (in frame.h). Lisp functions may ask for resizing a frame either explicitly, using one of the interfaces provided for that purpose like, for example, - 'set-frame-size' or changing the 'height' or 'width' parameter of that - frame, or implicitly, for example, by turning off/on or changing the - width of fringes or scroll bars for that frame. Any such request - passes through the routine 'adjust_frame_size' (in frame.c) which - decides, among others, whether the native frame size would really - change and whether it is allowed to change it at that moment. Only if - 'adjust_frame_size' decides that the corresponding terminal's - 'set_window_size_hook' may be run, it will dispatch execution to the - appropriate function which, for X builds, is 'x_set_window_size' in - this file. - - For GTK builds, 'x_set_window_size' calls 'xg_frame_set_char_size' in - gtkutil.c if the frame has an edit widget and 'x_set_window_size_1' in - this file otherwise. For non-GTK builds, 'x_set_window_size' always - calls 'x_set_window_size_1' directly. + 'set-frame-size' or changing the 'height' or 'width' parameter of + that frame, or implicitly, for example, by turning off/on or + changing the width of fringes or scroll bars for that frame. Any + such request passes through the routine 'adjust_frame_size' (in + frame.c) which decides, among others, whether the native frame size + would really change and whether it is allowed to change it at that + moment. Only if 'adjust_frame_size' decides that the corresponding + terminal's 'set_window_size_hook' may be run, it will dispatch + execution to the appropriate function which, for X builds, is + 'x_set_window_size' in this file. + + For GTK builds, 'x_set_window_size' calls 'xg_frame_set_char_size' + in gtkutil.c if the frame has an edit widget and + 'x_set_window_size_1' in this file otherwise. For non-GTK builds, + 'x_set_window_size' always calls 'x_set_window_size_1' directly. 'xg_frame_set_char_size' calls the GTK function 'gtk_window_resize' for the frame's outer widget; x_set_window_size_1 calls the Xlib @@ -378,28 +379,30 @@ along with GNU Emacs. If not, see . */ visible, it calls 'adjust_frame_size' to run 'resize_frame_windows' (see below) and hopes for the best. - Note that if Emacs receives a ConfigureEvent in response to an earlier - resize request, the sizes specified by that event are not necessarily - the sizes Emacs requested. Window manager and toolkit may override - any of the requested sizes for their own reasons. + Note that if Emacs receives a ConfigureEvent in response to an + earlier resize request, the sizes specified by that event are not + necessarily the sizes Emacs requested. Window manager and toolkit + may override any of the requested sizes for their own reasons. - On X, size notifications are received as ConfigureNotify events. The - expected reaction to such an event on the Emacs side is to resize all - Emacs windows that are on the frame referred to by the event. Since - resizing Emacs windows and redisplaying their buffers is a costly - operation, Emacs may collapse several subsequent ConfigureNotify - events into one to avoid that Emacs falls behind in user interactions - like resizing a frame by dragging one of its borders with the mouse. + On X, size notifications are received as ConfigureNotify events. + The expected reaction to such an event on the Emacs side is to + resize all Emacs windows that are on the frame referred to by the + event. Since resizing Emacs windows and redisplaying their buffers + is a costly operation, Emacs may collapse several subsequent + ConfigureNotify events into one to avoid that Emacs falls behind in + user interactions like resizing a frame by dragging one of its + borders with the mouse. Each ConfigureEvent event specifies a window, a width and a height. The event loop uses 'x_top_window_to_frame' to associate the window - with its frame. Once the frame has been identified, on GTK the event - is dispatched to 'xg_frame_resized'. On Motif/Lucid 'x_window' has - installed 'EmacsFrameResize' as the routine that handles resize - events. In either case, these routines end up calling the function - 'change_frame_size' in dispnew.c. On non-toolkit builds the effect is - to call 'change_frame_size' directly from the event loop. In either - case, the value true is passed as the DELAY argument. + with its frame. Once the frame has been identified, on GTK the + event is dispatched to 'xg_frame_resized'. On Motif/Lucid + 'x_window' has installed 'EmacsFrameResize' as the routine that + handles resize events. In either case, these routines end up + calling the function 'change_frame_size' in dispnew.c. On + non-toolkit builds the effect is to call 'change_frame_size' + directly from the event loop. In either case, the value true is + passed as the DELAY argument. 'change_frame_size' is the central function to decide whether it is safe to process a resize request immediately or it has to be delayed @@ -412,28 +415,30 @@ along with GNU Emacs. If not, see . */ possibly replacing ones that have been stored there upon the receipt of a preceding ConfigureEvent. - Delayed size changes are applied eventually upon calls of the function - 'do_pending_window_change' (in dispnew.c) which is called by the - redisplay code at suitable spots where it's safe to change sizes. - 'do_pending_window_change' calls 'change_frame_size' with its DELAY - argument false in the hope that it is now safe to call the function - 'resize_frame_windows' (in window.c) which is in charge of adjusting - the sizes of all Emacs windows on the frame accordingly. Note that if - 'resize_frame_windows' decides that the windows of a frame do not fit - into the constraints set up by the new frame sizes, it will resize the - windows to some minimum sizes with the effect that parts of the frame - at the right and bottom will appear clipped off. - - In addition to explicitly passing width and height values in functions - like 'gtk_window_resize' or 'XResizeWindow', Emacs also sets window - manager size hints - a more implicit form of asking for the size Emacs - would like its frames to assume. Some of these hints only restate the - size and the position explicitly requested for a frame. Another hint - specifies the increments in which the window manager should resize a - frame to - either set to the default character size of a frame or to - one pixel for a non-nil value of 'frame-resize-pixelwise'. See the - function 'x_wm_set_size_hint' - in gtkutil.c for GTK and in this file - for other builds - for the details. + Delayed size changes are applied eventually upon calls of the + function 'do_pending_window_change' (in dispnew.c) which is called + by the redisplay code at suitable spots where it's safe to change + sizes. 'do_pending_window_change' calls 'change_frame_size' with + its DELAY argument false in the hope that it is now safe to call the + function 'resize_frame_windows' (in window.c) which is in charge of + adjusting the sizes of all Emacs windows on the frame accordingly. + Note that if 'resize_frame_windows' decides that the windows of a + frame do not fit into the constraints set up by the new frame sizes, + it will resize the windows to some minimum sizes with the effect + that parts of the frame at the right and bottom will appear clipped + off. + + In addition to explicitly passing width and height values in + functions like 'gtk_window_resize' or 'XResizeWindow', Emacs also + sets window manager size hints - a more implicit form of asking for + the size Emacs would like its frames to assume. Some of these hints + only restate the size and the position explicitly requested for a + frame. Another hint specifies the increments in which the window + manager should resize a frame to - either set to the default + character size of a frame or to one pixel for a non-nil value of + 'frame-resize-pixelwise'. See the function 'x_wm_set_size_hint' - + in gtkutil.c for GTK and in this file for other builds - for the + details. We have not discussed here a number of special issues like, for example, how to handle size requests and notifications for maximized @@ -442,13 +447,56 @@ along with GNU Emacs. If not, see . */ used. One thing that might come handy when investigating problems wrt - resizing frames is the variable 'frame-size-history'. Setting this to - a non-nil value, will cause Emacs to start recording frame size + resizing frames is the variable 'frame-size-history'. Setting this + to a non-nil value, will cause Emacs to start recording frame size adjustments, usually specified by the function that asked for an adjustment, a sizes part that records the old and new values of the frame's width and height and maybe some additional information. The internal function `frame--size-history' can then be used to display - the value of this variable in a more readable form. */ + the value of this variable in a more readable form. + + FRAME RESIZE SYNCHRONIZATION + + The X window system operates asynchronously. That is to say, the + window manager and X server might think a window has been resized + before Emacs has a chance to process the ConfigureNotify event that + was sent. + + When a compositing manager is present, and the X server and Emacs + both support the X synchronization extension, the semi-standard + frame synchronization protocol can be used to notify the compositing + manager of when Emacs has actually finished redisplaying the + contents of a frame after a resize. The compositing manager will + customarily then postpone displaying the contents of the frame until + the redisplay is complete. + + Emacs announces support for this protocol by creating an X + server-side counter object, and setting it as the + `_NET_WM_SYNC_REQUEST_COUNTER' property of the frame's top-level + window. The window manager then initiates the synchronized resize + process by sending Emacs a ClientMessage event before the + ConfigureNotify event where: + + type = ClientMessage + window = the respective client window + message_type = WM_PROTOCOLS + format = 32 + data.l[0] = _NET_WM_SYNC_REQUEST + data.l[1] = timestamp + data.l[2] = low 32 bits of a provided frame counter value + data.l[3] = high 32 bits of a provided frame counter value + data.l[4] = 1 if the the extended frame counter should be updated, + otherwise 0 + + Upon receiving such an event, Emacs constructs and saves a counter + value from the provided low and high 32 bits. Then, when the + display engine tells us that a frame has been completely updated + (presumably because of a redisplay caused by a ConfigureNotify + event), we set the counter to the saved value, telling the + compositing manager that the contents of the window now accurately + reflect the new size. The compositing manager will then display the + contents of the window, and the window manager might also postpone + updating the window decorations until this moment. */ #include #include commit d150eb438baa62ef3965ef4dc1f9f342ed839a18 Author: Paul Eggert Date: Mon Feb 28 13:16:44 2022 -0800 Work around merge-gnulib glitch from fresh checkout * admin/merge-gnulib: In a fresh checkout, run gnulib-tool twice, instead of merely running autogen.sh twice. diff --git a/admin/merge-gnulib b/admin/merge-gnulib index fec469c017..7219fadd47 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -102,34 +102,44 @@ test -x "$gnulib_srcdir"/gnulib-tool || { exit 1 } -# gnulib-tool has problems with a bare checkout (Bug#32452#65). -test -f configure || ./autogen.sh || exit - # Old caches can confuse autoconf when some Gnulib-related changes take effect. rm -fr autom4te.cache || exit +# gnulib-tool has problems with a bare checkout (Bug#32452#91). +if test -f configure; then + passes='1' +else + passes='1 2' +fi + avoided_flags= for module in $AVOIDED_MODULES; do avoided_flags="$avoided_flags --avoid=$module" done -"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS \ +for pass in $passes; do + case $pass in + 2) echo 'Running gnulib-tool again to work around Bug#32452#91.' >&2 + esac + + "$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS \ $avoided_flags $GNULIB_MODULES && -rm -- "$src"lib/gl_openssl.h \ - "$src"lib/stdio-read.c "$src"lib/stdio-write.c \ - "$src"m4/fcntl-o.m4 \ - "$src"m4/gl-openssl.m4 \ - "$src"m4/gnulib-cache.m4 "$src"m4/gnulib-tool.m4 \ - "$src"m4/manywarnings-c++.m4 \ - "$src"m4/warn-on-use.m4 "$src"m4/wint_t.m4 && -cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && -cp -- "$gnulib_srcdir"/build-aux/config.guess \ - "$gnulib_srcdir"/build-aux/config.sub \ - "$gnulib_srcdir"/build-aux/install-sh \ - "$gnulib_srcdir"/build-aux/move-if-change \ - "$src"build-aux && -cp -- "$gnulib_srcdir"/lib/af_alg.h \ - "$gnulib_srcdir"/lib/save-cwd.h \ - "$src"lib && -{ test -z "$src" || cd "$src"; } && -./autogen.sh + rm -- "$src"lib/gl_openssl.h \ + "$src"lib/stdio-read.c "$src"lib/stdio-write.c \ + "$src"m4/fcntl-o.m4 \ + "$src"m4/gl-openssl.m4 \ + "$src"m4/gnulib-cache.m4 "$src"m4/gnulib-tool.m4 \ + "$src"m4/manywarnings-c++.m4 \ + "$src"m4/warn-on-use.m4 "$src"m4/wint_t.m4 && + cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && + cp -- "$gnulib_srcdir"/build-aux/config.guess \ + "$gnulib_srcdir"/build-aux/config.sub \ + "$gnulib_srcdir"/build-aux/install-sh \ + "$gnulib_srcdir"/build-aux/move-if-change \ + "$src"build-aux && + cp -- "$gnulib_srcdir"/lib/af_alg.h \ + "$gnulib_srcdir"/lib/save-cwd.h \ + "$src"lib && + { test -z "$src" || cd "$src"; } && + ./autogen.sh || exit +done commit 83b0f46a268933eeb0fe9d5f5a69bb7dcfac54fd Author: Stefan Monnier Date: Mon Feb 28 11:59:38 2022 -0500 ecomplete: Try and avoid losing data * lisp/ecomplete.el (ecomplete-add-item): Make sure the database is setup, so we don't risk overwriting it with a (mostly) empty one. (ecomplete-save): Don't save an empty database. diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el index 260657e0f7..c39c6c2ff9 100644 --- a/lisp/ecomplete.el +++ b/lisp/ecomplete.el @@ -65,10 +65,11 @@ :type 'file) (defcustom ecomplete-database-file-coding-system 'iso-2022-7bit + ;; FIXME: We should transition to `utf-8-emacs-unix' somehow! "Coding system used for writing the ecomplete database file." :type '(symbol :tag "Coding system")) -(defcustom ecomplete-sort-predicate 'ecomplete-decay +(defcustom ecomplete-sort-predicate #'ecomplete-decay "Predicate to use when sorting matched. The predicate is called with two parameters that represent the completion. Each parameter is a list where the first element is @@ -95,6 +96,7 @@ string that was matched." (defun ecomplete-add-item (type key text) "Add item TEXT of TYPE to the database, using KEY as the identifier." + (unless ecomplete-database (ecomplete-setup)) (let ((elems (assq type ecomplete-database)) (now (time-convert nil 'integer)) entry) @@ -110,19 +112,23 @@ string that was matched." (defun ecomplete-save () "Write the .ecompleterc file." - (with-temp-buffer - (let ((coding-system-for-write ecomplete-database-file-coding-system)) - (insert "(") - (cl-loop for (type . elems) in ecomplete-database - do - (insert (format "(%s\n" type)) - (dolist (entry elems) - (prin1 entry (current-buffer)) - (insert "\n")) - (insert ")\n")) - (insert ")") - (write-region (point-min) (point-max) - ecomplete-database-file nil 'silent)))) + ;; If the database is empty, it might be because we haven't called + ;; `ecomplete-setup', so better not save at all, lest we lose the real + ;; database! + (when ecomplete-database + (with-temp-buffer + (let ((coding-system-for-write ecomplete-database-file-coding-system)) + (insert "(") + (cl-loop for (type . elems) in ecomplete-database + do + (insert (format "(%s\n" type)) + (dolist (entry elems) + (prin1 entry (current-buffer)) + (insert "\n")) + (insert ")\n")) + (insert ")") + (write-region (point-min) (point-max) + ecomplete-database-file nil 'silent))))) (defun ecomplete-get-matches (type match) (let* ((elems (cdr (assq type ecomplete-database))) commit 0d123d602c68c3634f9d5d0260c1fea552825f06 Author: Martin Rudalics Date: Mon Feb 28 16:36:15 2022 +0100 ; In xterm.c add comment about frame resizing under X diff --git a/src/xterm.c b/src/xterm.c index 64c340e4dc..adfd7d2f9e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -257,7 +257,7 @@ along with GNU Emacs. If not, see . */ roughly be classified as belonging to one of three categories: - Using no toolkit at all. - - Using the X Toolkit Intrinstics (Xt). + - Using the X Toolkit Intrinsics (Xt). - Using GTK. The no toolkit configuration is the simplest: no toolkit widgets are @@ -336,7 +336,119 @@ along with GNU Emacs. If not, see . */ then the event will not be dispatched to Xt or utilized by GTK. Code inside `handle_one_xevent' should thus avoid making assumptions about the event dispatch mechanism and use that parameter - instead. */ + instead. + + FRAME RESIZING + + In the following explanations "frame size" refers to the "native size" + of a frame as reported by the (frame.h) macros FRAME_PIXEL_WIDTH and + FRAME_PIXEL_HEIGHT. These specify the size of a frame as the values + passed to/received from a toolkit and the window manager. The "text + size" Emacs Lisp code uses in functions like 'set-frame-size' or sees + in the ‘width’ and 'height' frame parameters is only loosely related + to the native size. The necessary translations are provided by the + macros FRAME_TEXT_TO_PIXEL_WIDTH and FRAME_TEXT_TO_PIXEL_HEIGHT as + well as FRAME_PIXEL_TO_TEXT_WIDTH and FRAME_PIXEL_TO_TEXT_HEIGHT (in + frame.h). + + Lisp functions may ask for resizing a frame either explicitly, using + one of the interfaces provided for that purpose like, for example, + 'set-frame-size' or changing the 'height' or 'width' parameter of that + frame, or implicitly, for example, by turning off/on or changing the + width of fringes or scroll bars for that frame. Any such request + passes through the routine 'adjust_frame_size' (in frame.c) which + decides, among others, whether the native frame size would really + change and whether it is allowed to change it at that moment. Only if + 'adjust_frame_size' decides that the corresponding terminal's + 'set_window_size_hook' may be run, it will dispatch execution to the + appropriate function which, for X builds, is 'x_set_window_size' in + this file. + + For GTK builds, 'x_set_window_size' calls 'xg_frame_set_char_size' in + gtkutil.c if the frame has an edit widget and 'x_set_window_size_1' in + this file otherwise. For non-GTK builds, 'x_set_window_size' always + calls 'x_set_window_size_1' directly. + + 'xg_frame_set_char_size' calls the GTK function 'gtk_window_resize' + for the frame's outer widget; x_set_window_size_1 calls the Xlib + function 'XResizeWindow' instead. In either case, if Emacs thinks + that the frame is visible, it will wait for a ConfigureNotify event + (see below) to occur within a timeout of 'x-wait-for-event-timeout' + (the default is 0.1 seconds). If Emacs thinks that the frame is not + visible, it calls 'adjust_frame_size' to run 'resize_frame_windows' + (see below) and hopes for the best. + + Note that if Emacs receives a ConfigureEvent in response to an earlier + resize request, the sizes specified by that event are not necessarily + the sizes Emacs requested. Window manager and toolkit may override + any of the requested sizes for their own reasons. + + On X, size notifications are received as ConfigureNotify events. The + expected reaction to such an event on the Emacs side is to resize all + Emacs windows that are on the frame referred to by the event. Since + resizing Emacs windows and redisplaying their buffers is a costly + operation, Emacs may collapse several subsequent ConfigureNotify + events into one to avoid that Emacs falls behind in user interactions + like resizing a frame by dragging one of its borders with the mouse. + + Each ConfigureEvent event specifies a window, a width and a height. + The event loop uses 'x_top_window_to_frame' to associate the window + with its frame. Once the frame has been identified, on GTK the event + is dispatched to 'xg_frame_resized'. On Motif/Lucid 'x_window' has + installed 'EmacsFrameResize' as the routine that handles resize + events. In either case, these routines end up calling the function + 'change_frame_size' in dispnew.c. On non-toolkit builds the effect is + to call 'change_frame_size' directly from the event loop. In either + case, the value true is passed as the DELAY argument. + + 'change_frame_size' is the central function to decide whether it is + safe to process a resize request immediately or it has to be delayed + (usually because its DELAY argument is true). Since resizing a + frame's windows may run arbitrary Lisp code, Emacs cannot generally + process resize requests during redisplay and therefore has to queue + them. If processing the event must be delayed, the new sizes (that + is, the ones requested by the ConfigureEvent) are stored in the + new_width and new_height slots of the respective frame structure, + possibly replacing ones that have been stored there upon the receipt + of a preceding ConfigureEvent. + + Delayed size changes are applied eventually upon calls of the function + 'do_pending_window_change' (in dispnew.c) which is called by the + redisplay code at suitable spots where it's safe to change sizes. + 'do_pending_window_change' calls 'change_frame_size' with its DELAY + argument false in the hope that it is now safe to call the function + 'resize_frame_windows' (in window.c) which is in charge of adjusting + the sizes of all Emacs windows on the frame accordingly. Note that if + 'resize_frame_windows' decides that the windows of a frame do not fit + into the constraints set up by the new frame sizes, it will resize the + windows to some minimum sizes with the effect that parts of the frame + at the right and bottom will appear clipped off. + + In addition to explicitly passing width and height values in functions + like 'gtk_window_resize' or 'XResizeWindow', Emacs also sets window + manager size hints - a more implicit form of asking for the size Emacs + would like its frames to assume. Some of these hints only restate the + size and the position explicitly requested for a frame. Another hint + specifies the increments in which the window manager should resize a + frame to - either set to the default character size of a frame or to + one pixel for a non-nil value of 'frame-resize-pixelwise'. See the + function 'x_wm_set_size_hint' - in gtkutil.c for GTK and in this file + for other builds - for the details. + + We have not discussed here a number of special issues like, for + example, how to handle size requests and notifications for maximized + and fullscreen frames or how to resize child frames. Some of these + require special treatment depending on the desktop or window manager + used. + + One thing that might come handy when investigating problems wrt + resizing frames is the variable 'frame-size-history'. Setting this to + a non-nil value, will cause Emacs to start recording frame size + adjustments, usually specified by the function that asked for an + adjustment, a sizes part that records the old and new values of the + frame's width and height and maybe some additional information. The + internal function `frame--size-history' can then be used to display + the value of this variable in a more readable form. */ #include #include commit cde8e5afbb651f1be04b5e79db984d00d751ca04 Author: Po Lu Date: Mon Feb 28 20:21:24 2022 +0800 Clean up input extension event handling code * src/xterm.c (handle_one_xevent): Fix usages of event structures of the wrong type. diff --git a/src/xterm.c b/src/xterm.c index f5bb9908bc..64c340e4dc 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11229,6 +11229,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, case DestroyNotify: xft_settings_event (dpyinfo, event); break; + #ifdef HAVE_XINPUT2 case GenericEvent: { @@ -11248,11 +11249,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, } XIDeviceEvent *xev = (XIDeviceEvent *) xi_event; - XILeaveEvent *leave = (XILeaveEvent *) xi_event; - XIEnterEvent *enter = (XIEnterEvent *) xi_event; - XIFocusInEvent *focusin = (XIFocusInEvent *) xi_event; - XIFocusOutEvent *focusout = (XIFocusOutEvent *) xi_event; - XIDeviceChangedEvent *device_changed = (XIDeviceChangedEvent *) xi_event; #ifdef HAVE_XINPUT2_1 XIValuatorState *states; double *values; @@ -11273,229 +11269,245 @@ handle_one_xevent (struct x_display_info *dpyinfo, switch (event->xcookie.evtype) { case XI_FocusIn: - any = x_any_window_to_frame (dpyinfo, focusin->event); + { + XIFocusInEvent *focusin = (XIFocusInEvent *) xi_event; + + any = x_any_window_to_frame (dpyinfo, focusin->event); #ifdef USE_GTK - /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap - minimized/iconified windows; thus, for those WMs we won't get - a MapNotify when unminimizing/deiconifying. Check here if we - are deiconizing a window (Bug42655). - - But don't do that by default on GTK since it may cause a plain - invisible frame get reported as iconified, compare - https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. - That is fixed above but bites us here again. - - The option x_set_frame_visibility_more_laxly allows to override - the default behavior (Bug#49955, Bug#53298). */ - if (EQ (x_set_frame_visibility_more_laxly, Qfocus_in) - || EQ (x_set_frame_visibility_more_laxly, Qt)) + /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap + minimized/iconified windows; thus, for those WMs we won't get + a MapNotify when unminimizing/deiconifying. Check here if we + are deiconizing a window (Bug42655). + + But don't do that by default on GTK since it may cause a plain + invisible frame get reported as iconified, compare + https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. + That is fixed above but bites us here again. + + The option x_set_frame_visibility_more_laxly allows to override + the default behavior (Bug#49955, Bug#53298). */ + if (EQ (x_set_frame_visibility_more_laxly, Qfocus_in) + || EQ (x_set_frame_visibility_more_laxly, Qt)) #endif /* USE_GTK */ - { - f = any; - if (f && FRAME_ICONIFIED_P (f)) - { - SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, false); - f->output_data.x->has_been_visible = true; - inev.ie.kind = DEICONIFY_EVENT; - XSETFRAME (inev.ie.frame_or_window, f); - } - } - x_detect_focus_change (dpyinfo, any, event, &inev.ie); - goto XI_OTHER; + { + f = any; + if (f && FRAME_ICONIFIED_P (f)) + { + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, false); + f->output_data.x->has_been_visible = true; + inev.ie.kind = DEICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } + } + x_detect_focus_change (dpyinfo, any, event, &inev.ie); + goto XI_OTHER; + } case XI_FocusOut: - any = x_any_window_to_frame (dpyinfo, focusout->event); - x_detect_focus_change (dpyinfo, any, event, &inev.ie); - goto XI_OTHER; + { + XIFocusOutEvent *focusout = (XIFocusOutEvent *) xi_event; + + any = x_any_window_to_frame (dpyinfo, focusout->event); + x_detect_focus_change (dpyinfo, any, event, &inev.ie); + goto XI_OTHER; + } case XI_Enter: - any = x_top_window_to_frame (dpyinfo, enter->event); - ev.x = lrint (enter->event_x); - ev.y = lrint (enter->event_y); - ev.window = enter->event; - x_display_set_last_user_time (dpyinfo, xi_event->time); + { + XIEnterEvent *enter = (XIEnterEvent *) xi_event; + + any = x_top_window_to_frame (dpyinfo, enter->event); + ev.x = lrint (enter->event_x); + ev.y = lrint (enter->event_y); + ev.window = enter->event; + x_display_set_last_user_time (dpyinfo, xi_event->time); #ifdef USE_MOTIF - use_copy = true; - - copy.xcrossing.type = EnterNotify; - copy.xcrossing.serial = enter->serial; - copy.xcrossing.send_event = enter->send_event; - copy.xcrossing.display = dpyinfo->display; - copy.xcrossing.window = enter->event; - copy.xcrossing.root = enter->root; - copy.xcrossing.subwindow = enter->child; - copy.xcrossing.time = enter->time; - copy.xcrossing.x = lrint (enter->event_x); - copy.xcrossing.y = lrint (enter->event_y); - copy.xcrossing.x_root = lrint (enter->root_x); - copy.xcrossing.y_root = lrint (enter->root_y); - copy.xcrossing.mode = enter->mode; - copy.xcrossing.detail = enter->detail; - copy.xcrossing.focus = enter->focus; - copy.xcrossing.state = 0; - copy.xcrossing.same_screen = True; -#endif - - /* There is no need to handle entry/exit events for - passive focus from non-top windows at all, since they - are an inferiors of the frame's top window, which will - get virtual events. */ - if (any) - x_detect_focus_change (dpyinfo, any, event, &inev.ie); + use_copy = true; - if (!any) - any = x_any_window_to_frame (dpyinfo, enter->event); + copy.xcrossing.type = EnterNotify; + copy.xcrossing.serial = enter->serial; + copy.xcrossing.send_event = enter->send_event; + copy.xcrossing.display = dpyinfo->display; + copy.xcrossing.window = enter->event; + copy.xcrossing.root = enter->root; + copy.xcrossing.subwindow = enter->child; + copy.xcrossing.time = enter->time; + copy.xcrossing.x = lrint (enter->event_x); + copy.xcrossing.y = lrint (enter->event_y); + copy.xcrossing.x_root = lrint (enter->root_x); + copy.xcrossing.y_root = lrint (enter->root_y); + copy.xcrossing.mode = enter->mode; + copy.xcrossing.detail = enter->detail; + copy.xcrossing.focus = enter->focus; + copy.xcrossing.state = 0; + copy.xcrossing.same_screen = True; +#endif + + /* There is no need to handle entry/exit events for + passive focus from non-top windows at all, since they + are an inferiors of the frame's top window, which will + get virtual events. */ + if (any) + x_detect_focus_change (dpyinfo, any, event, &inev.ie); + + if (!any) + any = x_any_window_to_frame (dpyinfo, enter->event); #ifdef HAVE_XINPUT2_1 - xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid, - true); + xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid, + true); #endif - { + { #ifdef HAVE_XWIDGETS - struct xwidget_view *xwidget_view = xwidget_view_from_window (enter->event); + struct xwidget_view *xwidget_view = xwidget_view_from_window (enter->event); #endif #ifdef HAVE_XWIDGETS - if (xwidget_view) - { - xwidget_motion_or_crossing (xwidget_view, event); + if (xwidget_view) + { + xwidget_motion_or_crossing (xwidget_view, event); - goto XI_OTHER; - } + goto XI_OTHER; + } #endif - } + } - f = any; + f = any; - if (f && x_mouse_click_focus_ignore_position) - ignore_next_mouse_click_timeout = xi_event->time + 200; + if (f && x_mouse_click_focus_ignore_position) + ignore_next_mouse_click_timeout = xi_event->time + 200; - /* EnterNotify counts as mouse movement, - so update things that depend on mouse position. */ - if (f && !f->output_data.x->hourglass_p) - x_note_mouse_movement (f, &ev); + /* EnterNotify counts as mouse movement, + so update things that depend on mouse position. */ + if (f && !f->output_data.x->hourglass_p) + x_note_mouse_movement (f, &ev); #ifdef USE_GTK - /* We may get an EnterNotify on the buttons in the toolbar. In that - case we moved out of any highlighted area and need to note this. */ - if (!f && dpyinfo->last_mouse_glyph_frame) - x_note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &ev); + /* We may get an EnterNotify on the buttons in the toolbar. In that + case we moved out of any highlighted area and need to note this. */ + if (!f && dpyinfo->last_mouse_glyph_frame) + x_note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &ev); #endif - goto XI_OTHER; + goto XI_OTHER; + } case XI_Leave: - ev.x = lrint (leave->event_x); - ev.y = lrint (leave->event_y); - ev.window = leave->event; - any = x_top_window_to_frame (dpyinfo, leave->event); + { + XILeaveEvent *leave = (XILeaveEvent *) xi_event; - /* This allows us to catch LeaveNotify events generated by - popup menu grabs. FIXME: this is right when there is a - focus menu, but implicit focus tracking can get screwed - up if we get this and no XI_Enter event later. */ + ev.x = lrint (leave->event_x); + ev.y = lrint (leave->event_y); + ev.window = leave->event; + any = x_top_window_to_frame (dpyinfo, leave->event); + + /* This allows us to catch LeaveNotify events generated by + popup menu grabs. FIXME: this is right when there is a + focus menu, but implicit focus tracking can get screwed + up if we get this and no XI_Enter event later. */ #ifdef USE_X_TOOLKIT - if (popup_activated () - && leave->mode == XINotifyPassiveUngrab) - any = x_any_window_to_frame (dpyinfo, leave->event); + if (popup_activated () + && leave->mode == XINotifyPassiveUngrab) + any = x_any_window_to_frame (dpyinfo, leave->event); #endif #ifdef USE_MOTIF - use_copy = true; - - copy.xcrossing.type = LeaveNotify; - copy.xcrossing.serial = leave->serial; - copy.xcrossing.send_event = leave->send_event; - copy.xcrossing.display = dpyinfo->display; - copy.xcrossing.window = leave->event; - copy.xcrossing.root = leave->root; - copy.xcrossing.subwindow = leave->child; - copy.xcrossing.time = leave->time; - copy.xcrossing.x = lrint (leave->event_x); - copy.xcrossing.y = lrint (leave->event_y); - copy.xcrossing.x_root = lrint (leave->root_x); - copy.xcrossing.y_root = lrint (leave->root_y); - copy.xcrossing.mode = leave->mode; - copy.xcrossing.detail = leave->detail; - copy.xcrossing.focus = leave->focus; - copy.xcrossing.state = 0; - copy.xcrossing.same_screen = True; -#endif - - /* One problem behind the design of XInput 2 scrolling is - that valuators are not unique to each window, but only - the window that has grabbed the valuator's device or - the window that the device's pointer is on top of can - receive motion events. There is also no way to - retrieve the value of a valuator outside of each motion - event. - - As such, to prevent wildly inaccurate results when the - valuators have changed outside Emacs, we reset our - records of each valuator's value whenever the pointer - moves out of a frame (and not into one of its - children, which we know about). */ + use_copy = true; + + copy.xcrossing.type = LeaveNotify; + copy.xcrossing.serial = leave->serial; + copy.xcrossing.send_event = leave->send_event; + copy.xcrossing.display = dpyinfo->display; + copy.xcrossing.window = leave->event; + copy.xcrossing.root = leave->root; + copy.xcrossing.subwindow = leave->child; + copy.xcrossing.time = leave->time; + copy.xcrossing.x = lrint (leave->event_x); + copy.xcrossing.y = lrint (leave->event_y); + copy.xcrossing.x_root = lrint (leave->root_x); + copy.xcrossing.y_root = lrint (leave->root_y); + copy.xcrossing.mode = leave->mode; + copy.xcrossing.detail = leave->detail; + copy.xcrossing.focus = leave->focus; + copy.xcrossing.state = 0; + copy.xcrossing.same_screen = True; +#endif + + /* One problem behind the design of XInput 2 scrolling is + that valuators are not unique to each window, but only + the window that has grabbed the valuator's device or + the window that the device's pointer is on top of can + receive motion events. There is also no way to + retrieve the value of a valuator outside of each motion + event. + + As such, to prevent wildly inaccurate results when the + valuators have changed outside Emacs, we reset our + records of each valuator's value whenever the pointer + moves out of a frame (and not into one of its + children, which we know about). */ #ifdef HAVE_XINPUT2_1 - if (leave->detail != XINotifyInferior && any) - xi_reset_scroll_valuators_for_device_id (dpyinfo, - enter->deviceid, false); + if (leave->detail != XINotifyInferior && any) + xi_reset_scroll_valuators_for_device_id (dpyinfo, + leave->deviceid, false); #endif - x_display_set_last_user_time (dpyinfo, xi_event->time); + x_display_set_last_user_time (dpyinfo, xi_event->time); #ifdef HAVE_XWIDGETS - { - struct xwidget_view *xvw - = xwidget_view_from_window (leave->event); + { + struct xwidget_view *xvw + = xwidget_view_from_window (leave->event); - if (xvw) - { - *finish = X_EVENT_DROP; - xwidget_motion_or_crossing (xvw, event); + if (xvw) + { + *finish = X_EVENT_DROP; + xwidget_motion_or_crossing (xvw, event); - goto XI_OTHER; - } - } + goto XI_OTHER; + } + } #endif - if (any) - x_detect_focus_change (dpyinfo, any, event, &inev.ie); + if (any) + x_detect_focus_change (dpyinfo, any, event, &inev.ie); #ifndef USE_X_TOOLKIT - f = x_top_window_to_frame (dpyinfo, leave->event); + f = x_top_window_to_frame (dpyinfo, leave->event); #else - /* On Xt builds that have XI2, the enter and leave event - masks are set on the frame widget's window. */ - f = x_window_to_frame (dpyinfo, leave->event); + /* On Xt builds that have XI2, the enter and leave event + masks are set on the frame widget's window. */ + f = x_window_to_frame (dpyinfo, leave->event); - if (!f) - f = x_top_window_to_frame (dpyinfo, leave->event); + if (!f) + f = x_top_window_to_frame (dpyinfo, leave->event); #endif - if (f) - { - if (f == hlinfo->mouse_face_mouse_frame) - { - /* If we move outside the frame, then we're - certainly no longer on any text in the frame. */ - clear_mouse_face (hlinfo); - hlinfo->mouse_face_mouse_frame = 0; - } + if (f) + { + if (f == hlinfo->mouse_face_mouse_frame) + { + /* If we move outside the frame, then we're + certainly no longer on any text in the frame. */ + clear_mouse_face (hlinfo); + hlinfo->mouse_face_mouse_frame = 0; + } - /* Generate a nil HELP_EVENT to cancel a help-echo. - Do it only if there's something to cancel. - Otherwise, the startup message is cleared when - the mouse leaves the frame. */ - if (any_help_event_p) - do_help = -1; - } + /* Generate a nil HELP_EVENT to cancel a help-echo. + Do it only if there's something to cancel. + Otherwise, the startup message is cleared when + the mouse leaves the frame. */ + if (any_help_event_p) + do_help = -1; + } #ifdef USE_GTK - /* See comment in EnterNotify above */ - else if (dpyinfo->last_mouse_glyph_frame) - x_note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &ev); + /* See comment in EnterNotify above */ + else if (dpyinfo->last_mouse_glyph_frame) + x_note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &ev); #endif - goto XI_OTHER; + goto XI_OTHER; + } case XI_Motion: { @@ -12496,6 +12508,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, case XI_DeviceChanged: { + XIDeviceChangedEvent *device_changed = (XIDeviceChangedEvent *) xi_event; struct xi_device_t *device; #ifdef HAVE_XINPUT2_2 struct xi_touch_point_t *tem, *last; commit 122b189219054f0c4a625e9707d2c0d37f472760 Author: Po Lu Date: Mon Feb 28 19:43:08 2022 +0800 * src/xterm.c (handle_one_xevent): Add some missing dead keys. diff --git a/src/xterm.c b/src/xterm.c index be499f3e26..f5bb9908bc 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10427,75 +10427,87 @@ handle_one_xevent (struct x_display_info *dpyinfo, /* Random non-modifier sorts of keysyms. */ if (((keysym >= XK_BackSpace && keysym <= XK_Escape) - || keysym == XK_Delete + || keysym == XK_Delete #ifdef XK_ISO_Left_Tab - || (keysym >= XK_ISO_Left_Tab - && keysym <= XK_ISO_Enter) + || (keysym >= XK_ISO_Left_Tab + && keysym <= XK_ISO_Enter) #endif - || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */ - || IsMiscFunctionKey (keysym) /* 0xff60 <= x < VARIES */ + || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */ + || IsMiscFunctionKey (keysym) /* 0xff60 <= x < VARIES */ #ifdef HPUX - /* This recognizes the "extended function - keys". It seems there's no cleaner way. - Test IsModifierKey to avoid handling - mode_switch incorrectly. */ - || (XK_Select <= keysym && keysym < XK_KP_Space) + /* This recognizes the "extended function + keys". It seems there's no cleaner way. + Test IsModifierKey to avoid handling + mode_switch incorrectly. */ + || (XK_Select <= keysym && keysym < XK_KP_Space) #endif #ifdef XK_dead_circumflex - || orig_keysym == XK_dead_circumflex + || orig_keysym == XK_dead_circumflex #endif #ifdef XK_dead_grave - || orig_keysym == XK_dead_grave + || orig_keysym == XK_dead_grave #endif #ifdef XK_dead_tilde - || orig_keysym == XK_dead_tilde + || orig_keysym == XK_dead_tilde #endif #ifdef XK_dead_diaeresis - || orig_keysym == XK_dead_diaeresis + || orig_keysym == XK_dead_diaeresis #endif #ifdef XK_dead_macron - || orig_keysym == XK_dead_macron + || orig_keysym == XK_dead_macron #endif #ifdef XK_dead_degree - || orig_keysym == XK_dead_degree + || orig_keysym == XK_dead_degree #endif #ifdef XK_dead_acute - || orig_keysym == XK_dead_acute + || orig_keysym == XK_dead_acute #endif #ifdef XK_dead_cedilla - || orig_keysym == XK_dead_cedilla + || orig_keysym == XK_dead_cedilla #endif #ifdef XK_dead_breve - || orig_keysym == XK_dead_breve + || orig_keysym == XK_dead_breve #endif #ifdef XK_dead_ogonek - || orig_keysym == XK_dead_ogonek + || orig_keysym == XK_dead_ogonek #endif #ifdef XK_dead_caron - || orig_keysym == XK_dead_caron + || orig_keysym == XK_dead_caron #endif #ifdef XK_dead_doubleacute - || orig_keysym == XK_dead_doubleacute + || orig_keysym == XK_dead_doubleacute #endif #ifdef XK_dead_abovedot - || orig_keysym == XK_dead_abovedot -#endif - || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ - || IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */ - /* Any "vendor-specific" key is ok. */ - || (orig_keysym & (1 << 28)) - || (keysym != NoSymbol && nbytes == 0)) - && ! (IsModifierKey (orig_keysym) - /* The symbols from XK_ISO_Lock - to XK_ISO_Last_Group_Lock - don't have real modifiers but - should be treated similarly to - Mode_switch by Emacs. */ + || orig_keysym == XK_dead_abovedot +#endif +#ifdef XK_dead_abovering + || orig_keysym == XK_dead_abovering +#endif +#ifdef XK_dead_belowdot + || orig_keysym == XK_dead_belowdot +#endif +#ifdef XK_dead_voiced_sound + || orig_keysym == XK_dead_voiced_sound +#endif +#ifdef XK_dead_semivoiced_sound + || orig_keysym == XK_dead_semivoiced_sound +#endif + || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ + || IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */ + /* Any "vendor-specific" key is ok. */ + || (orig_keysym & (1 << 28)) + || (keysym != NoSymbol && nbytes == 0)) + && ! (IsModifierKey (orig_keysym) + /* The symbols from XK_ISO_Lock + to XK_ISO_Last_Group_Lock + don't have real modifiers but + should be treated similarly to + Mode_switch by Emacs. */ #if defined XK_ISO_Lock && defined XK_ISO_Last_Group_Lock - || (XK_ISO_Lock <= orig_keysym - && orig_keysym <= XK_ISO_Last_Group_Lock) + || (XK_ISO_Lock <= orig_keysym + && orig_keysym <= XK_ISO_Last_Group_Lock) #endif - )) + )) { STORE_KEYSYM_FOR_DEBUG (keysym); /* make_lispy_event will convert this to a symbolic @@ -12384,6 +12396,18 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif #ifdef XK_dead_abovedot || keysym == XK_dead_abovedot +#endif +#ifdef XK_dead_abovering + || keysym == XK_dead_abovering +#endif +#ifdef XK_dead_belowdot + || keysym == XK_dead_belowdot +#endif +#ifdef XK_dead_voiced_sound + || keysym == XK_dead_voiced_sound +#endif +#ifdef XK_dead_semivoiced_sound + || keysym == XK_dead_semivoiced_sound #endif || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ || IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */ commit cb0aad2dbec3a26e49fd18c732dc943c4aec0ccb Author: Mattias Engdegård Date: Mon Feb 28 12:13:52 2022 +0100 Clean up byte-compile-arglist-warn * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): Remove unnecessary sort (only need min and max). Reduce mutation. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6f83429dd4..432fd2ad9c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1583,32 +1583,31 @@ extra args." ;; number of arguments. (defun byte-compile-arglist-warn (name arglist macrop) ;; This is the first definition. See if previous calls are compatible. - (let ((calls (assq name byte-compile-unresolved-functions)) - nums sig min max) - (when (and calls macrop) - (byte-compile-warn-x name "macro `%s' defined too late" name)) - (setq byte-compile-unresolved-functions - (delq calls byte-compile-unresolved-functions)) - (setq calls (delq t calls)) ;Ignore higher-order uses of the function. - (when (cddr calls) - (when (and (symbolp name) - (eq (function-get name 'byte-optimizer) - 'byte-compile-inline-expand)) - (byte-compile-warn-x name "defsubst `%s' was used before it was defined" - name)) - (setq sig (byte-compile-arglist-signature arglist) - nums (sort (copy-sequence (cddr calls)) (function <)) - min (car nums) - max (car (nreverse nums))) - (when (or (< min (car sig)) - (and (cdr sig) (> max (cdr sig)))) - (byte-compile-warn-x - name - "%s being defined to take %s%s, but was previously called with %s" - name - (byte-compile-arglist-signature-string sig) - (if (equal sig '(1 . 1)) " arg" " args") - (byte-compile-arglist-signature-string (cons min max)))))) + (let ((calls (assq name byte-compile-unresolved-functions))) + (when calls + (when macrop + (byte-compile-warn-x name "macro `%s' defined too late" name)) + (setq byte-compile-unresolved-functions + (delq calls byte-compile-unresolved-functions)) + (let ((nums (delq t (cddr calls)))) ; Ignore higher-order uses. + (when nums + (when (and (symbolp name) + (eq (function-get name 'byte-optimizer) + 'byte-compile-inline-expand)) + (byte-compile-warn-x + name "defsubst `%s' was used before it was defined" name)) + (let ((sig (byte-compile-arglist-signature arglist)) + (min (apply #'min nums)) + (max (apply #'max nums))) + (when (or (< min (car sig)) + (and (cdr sig) (> max (cdr sig)))) + (byte-compile-warn-x + name + "%s being defined to take %s%s, but was previously called with %s" + name + (byte-compile-arglist-signature-string sig) + (if (equal sig '(1 . 1)) " arg" " args") + (byte-compile-arglist-signature-string (cons min max))))))))) (let* ((old (byte-compile-fdefinition name macrop)) (initial (and macrop (cdr (assq name commit cd32693151dbce3e70288a8c7ecc84e0c00f20aa Author: Lars Ingebrigtsen Date: Mon Feb 28 11:41:52 2022 +0100 Fix :color specification in flat-button boxes * src/xfaces.c (realize_gui_face): Allow reliably specifying :color in flat-button boxes (bug#54196). diff --git a/src/xfaces.c b/src/xfaces.c index 55a9bed8f2..8100bdb157 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5978,6 +5978,8 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] } else if (CONSP (box)) { + bool set_color = false; + /* `(:width WIDTH :color COLOR :shadow SHADOW)'. SHADOW being one of `raised' or `sunken'. */ face->box = FACE_SIMPLE_BOX; @@ -6015,6 +6017,7 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] face->box_color = load_color (f, face, value, LFACE_BOX_INDEX); face->use_box_color_for_shadows_p = true; + set_color = true; } } else if (EQ (keyword, QCstyle)) @@ -6026,7 +6029,9 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE] else if (EQ (value, Qflat_button)) { face->box = FACE_SIMPLE_BOX; - face->box_color = face->background; + /* Don't override colors set in this box. */ + if (!set_color) + face->box_color = face->background; } } } commit 15a76160bba87da9cef11c017d90c4e94f37d817 Author: Lars Ingebrigtsen Date: Mon Feb 28 10:30:31 2022 +0100 Don't throw errors while propertizing in sgml-mode * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Don't throw an error when propertizing (bug#54195). diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 83631e6475..b49541f47d 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -419,11 +419,11 @@ These have to be run via `sgml-syntax-propertize'")) (defun sgml-syntax-propertize (start end &optional rules-function) "Syntactic keywords for `sgml-mode'." (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) - (cl-assert (>= (cadr sgml--syntax-propertize-ppss) 0)) - (sgml-syntax-propertize-inside end) - (funcall (or rules-function sgml--syntax-propertize) (point) end) - ;; Catch any '>' after the last quote. - (sgml--syntax-propertize-ppss end)) + (when (>= (cadr sgml--syntax-propertize-ppss) 0) + (sgml-syntax-propertize-inside end) + (funcall (or rules-function sgml--syntax-propertize) (point) end) + ;; Catch any '>' after the last quote. + (sgml--syntax-propertize-ppss end))) (defun sgml-syntax-propertize-inside (end) (let ((ppss (syntax-ppss))) commit 6dbc3da2055610109c8e481e53f0b0287b201e58 (refs/remotes/origin/emacs-28) Author: Lars Ingebrigtsen Date: Mon Feb 28 10:14:03 2022 +0100 Fix :tag for eol in tab-first-completion * lisp/indent.el (tab-first-completion): Fix the :tag description (bug#54179). diff --git a/lisp/indent.el b/lisp/indent.el index 48e5b309e4..071f46fd42 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -77,7 +77,7 @@ This variable has no effect unless `tab-always-indent' is `complete'." :group 'indent :type '(choice (const :tag "Always complete" nil) - (const :tag "Unless at the end of a line" eol) + (const :tag "Only complete at the end of a line" eol) (const :tag "Unless looking at a word" word) (const :tag "Unless at a word or parenthesis" word-or-paren) (const :tag "Unless at a word, parenthesis, or punctuation."