summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-01-21Work around GTK changing window backgrounds on colormapped displaysPo Lu
* src/xterm.c (x_clear_window): (x_clear_area): Fill the contents with the reverse GC instead of using XClearArea and XClearWindow when not double buffered.
2022-01-21Fix BadValue crash when looking up empty color names on some X serversPo Lu
* src/xterm.c (x_parse_color): Avoid parsing empty color names.
2022-01-21Allow fractional values of `polling-period'Po Lu
This allows C-g to be handled faster in the NS port at the cost of some extra CPU time on slow machines. * etc/NEWS: Announce new feature. * src/keyboard.c (start_polling): (bind_polling_period): Handle floating point values of `polling-period'. (syms_of_keyboard): Make `polling-period' a Lisp variable instead of an int variable.
2022-01-21Avoid FOCUS_IN_EVENTS not being sent on NSPo Lu
* src/nsterm.m ([EmacsView windowDidBecomeKey]): Work around emacs_event being NULL by storing focus in events directly into the keyboard buffer. (bug#52376)
2022-01-20In early bootstrap, use byte-compiled compiler to native compile first filesAlan Mackenzie
This speeds up a make bootstrap by around 15%. * lisp/Makefile.in (BYTE_COMPILE_FLAGS): set a value specific to compile-first which doesn't contain the setting of Emacs variable load-prefer-newer. Add a new make hunk which byte-compiles (rather then native compiles) when the environment variable ANCIENT is "yes". Set the date of the .elc files built to 1971-01-01 to cause a second compilation of them later. * src/Makefile.in: Add an extra invocation of directory lisp's MAKE with target compile-first and the flag environment variable ANCIENT set to yes. * src/verbose.mk.in: When ANCIENT is yes, output ELC, not ELC+ELN for AM_V_ELC.
2022-01-20Update documentation of 'clone-indirect-buffer-hook'Eli Zaretskii
* doc/emacs/buffers.texi (Indirect Buffers): * src/buffer.c (syms_of_buffer) <clone-indirect-buffer-hook>: Update the documentation of 'clone-indirect-buffer-hook' due the recent changes. * etc/NEWS: Mention the change in where the hook is run. * lisp/face-remap.el (face-attrs--make-indirect-safe): Doc fix.
2022-01-20Fix indirect font changes incorrectly affecting original bufferAndrew Hyatt
* lisp/face-remap.el (face-attrs--make-indirect-safe): (clone-indirect-buffer-hook): Set up a face remapping alist (bug#53294). * lisp/simple.el (clone-indirect-buffer): Move the point the hook is run. * src/buffer.c (Fmake_indirect_buffer, syms_of_buffer): Move the place where the clone-indirect-buffer-hook variable is defined, so that we can call it from C.
2022-01-20Make system tooltips display in the menu bar on HaikuPo Lu
* doc/emacs/haiku.texi (Haiku Basics): Update documentation. * src/haiku_support.cc (Highlight): Apply the hack used for regular menus to the menu bar as well. * src/haikumenu.c (digest_menu_items): Set help text on menu bar if `tooltip-mode' is t and system tooltips are used. (syms_of_haikumenu): New symbol `tooltip-mode'.
2022-01-20Fix Fchar_syntax for non-ASCII in unibyte buffersMattias Engdegård
Fchar_syntax did not convert unibyte characters to multibyte when the current buffer was unibyte, in contrast to `char-syntax` in byte-compiled code (bug#53260). * src/bytecode.c (exec_byte_code): Call out to Fchar_syntax; the dynamic frequency is too low to justify inlining here, and it did lead to implementations diverging. * src/syntax.c (Fchar_syntax): Convert non-ASCII unibyte values to multibyte. * test/src/syntax-tests.el (syntax-char-syntax): New test.
2022-01-20Fix 'bidi-find-overridden-directionality' for Lisp stringsEli Zaretskii
* src/bidi.c (bidi_find_first_overridden): Don't use ZV for Lisp strings. Reported by Lars Ingebrigtsen <larsi@gnus.org>.
2022-01-20Add workaround to handle a problem with Enlightenment WM (Bug#53298)Martin Rudalics
* src/xterm.c (handle_one_xevent): Handle setting of variable 'x_set_frame_visibility_more_laxly' when receiving an Expose or FocusIn event (Bug#53298). (Qexpose): Define symbol. (x_set_frame_visibility_more_laxly): New Lisp variable. * etc/PROBLEMS: Mention frame redraw problem with the Enlightenment WM and 'x-set-frame-visibility-more-laxly' workaround.
2022-01-20Make `nil' values of the `:position' underline property work correctlyPo Lu
* src/xfaces.c (Finternal_set_lisp_face_attribute): Handle cases where the underline property `:position' is nil.
2022-01-20Port hourglass display to XCBPo Lu
* src/xterm.c (x_show_hourglass): (x_hide_hourglass): Use straightforward translations to XCB if available.
2022-01-20Get rid of calls to XRenderQueryExtension after terminal initializationPo Lu
* src/image.c (x_create_xrender_picture): (Fimage_transforms_p): Use `xrender_supported_p'. * src/xterm.c (x_term_init): Query for XRender support and extension versions. * src/xterm.h (struct x_display_info): New fields `xrender_supported_p', `xrender_major' and `xrender_minor'.
2022-01-20Implement selection ownership on HaikuPo Lu
* lisp/term/haiku-win.el (haiku-selection-owner-p): New declaration. (gui-backend-selection-owner-p): Implement using newly exposed primitive. * src/haiku_select.cc (count_clipboard, count_primary, count_secondary): New variables for tracking selection ownership. (BClipboard_set_system_data): (BClipboard_set_primary_selection_data): (BClipboard_set_secondary_selection_data): Set ownership variables. (BClipboard_owns_clipboard): (BClipboard_owns_primary): (BClipboard_owns_secondary): New functions. * src/haikuselect.c (Fhaiku_selection_owner_p): New function. (syms_of_haikuselect): Define new subr. * src/haikuselect.h: New prototypes.
2022-01-19Fix recent change for big endian systems where `Atom' is 64 bitsPo Lu
* src/xfns.c (x_create_tip_frame): Cast atoms to xcb_atom_t and pass a reference to that to xcb_change_property instead.
2022-01-19Port some X11 tooltip code to XCBPo Lu
* configure.ac: Require `xcb-aux' to be present before using XCB. * src/xfns.c (x_sync): (x_create_tip_frame): (Fx_show_tip): Port window related code to XCB.
2022-01-19Use Cairo XCB surfaces when XCB is availablePo Lu
This lets us get at goodies such as shm support, which aren't available with the xlib surface. (bug#52120) * configure.ac: Test for cairo-xcb if cairo is available on X. * src/xterm.c (USE_CAIRO_XCB_SURFACE): New define. (x_begin_cr_clip): Create XCB surfaces if available. (x_try_cr_xlib_drawable): (x_scroll_run): Handle XCB surfaces. (x_term_init): Find XCB visualtype structure. * src/xterm.h (struct x_display_info): New field `xcb_visual'. * src/xwidget.c (x_draw_xwidget_glyph_string): Fix integer overflow.
2022-01-19* src/haikufns.c (Fx_display_mm_width): Fix copy-paste error.Po Lu
2022-01-19Rename system tooltip variables to `use-system-tooltips'Po Lu
* doc/emacs/frames.texi (Tooltips): * doc/emacs/haiku.texi (Haiku Basics): * doc/lispref/display.texi (Tooltips): Document `use-system-tooltips' instead. * etc/NEWS: Announce new option. * lisp/cus-start.el (standard): Add new option. * lisp/term/haiku-win.el (haiku-use-system-tooltips): * lisp/term/pgtk-win.el (x-gtk-use-system-tooltips): * lisp/term/x-win.el (x-gtk-use-system-tooltips): Add aliases for old options. * src/frame.c (syms_of_frame): New variable `use-system-tooltips'. * src/haikufns.c (Fx_show_tip): (syms_of_haikufns): * src/pgtkfns.c (x_hide_tip): (Fx_show_tip): (syms_of_pgtkfns): * src/xfns.c (x_hide_tip): (Fx_show_tip): (syms_of_xfns): Use `use-system-tooltips' instead of the old platform dependent options.
2022-01-19Use more reliable timestamps for some kinds of events on HaikuPo Lu
* src/haiku_support.cc (DispatchMessage): (MouseMoved): (MouseDown): (MouseUp): Set `time' field of event structures to input server time. * src/haiku_support.h (struct haiku_key_event): (struct haiku_mouse_motion_event): (struct haiku_button_event): New field `time'. * src/haikuterm.c (haiku_read_socket): Use input server time if provided.
2022-01-19Fix event timestamp generation on HaikuPo Lu
* src/haikuterm.c (haiku_read_socket): Use miliseconds for event time.
2022-01-18Remove 'cuneiform-numbers-and-punctuation' from w32font.cEli Zaretskii
* src/w32font.c (syms_of_w32font, font_supported_scripts): Remove 'cuneiform-numbers-and-punctuation'. Reported by Kévin Le Gouguec <kevin.legouguec@gmail.com>.
2022-01-18Intern virtual modifier atoms the smart way on XPo Lu
* src/xterm.c (x_find_modifier_meanings): Get rid of calls to XInternAtom. (x_term_init): Initialize atom refs for virtual modifiers and make sure to only call `x_find_modifier_meanings' after they are interned. * src/xterm.h (struct x_display_info): New fields for virtual modifier atoms.
2022-01-18* src/haikuterm.c (haiku_read_socket): Add work for frame size bug.Po Lu
BWindow::ResizeTo seems to have the same rounding issues that BRect has, but I have no idea how to solve it there. As a temporary workaround until a solution has been found, avoid garbaging tooltip frames when FrameResized reports different dimensions from what they were set to.
2022-01-18* src/haikufns.c (Fx_show_tip): Fix typo.Po Lu
2022-01-18Fix default value of `no-special-glyphs' frame parameter on HaikuPo Lu
* src/haikufns.c (haiku_create_frame): Make `no-special-glyphs' nil by default.
2022-01-18Improve tooltip implementation on HaikuPo Lu
This fixes several issues: tooltips having no right internal border, reusing tooltips occasionally freezing Emacs, and inconsistent behaviour when compared to X. * src/haiku_support.cc (BWindow_resize): Revert a recent change. (BView_move_frame): (BWindow_set_avoid_focus): Stop sync'ing when locked. This tends to cause lockups for an unknown reason. * src/haikufns.c (initial_setup_back_buffer): New function. (haiku_create_frame): Remove tooltip related code. (haiku_set_internal_border_width): Handle cases where the face cache is NULL and/or the window has not been created. (haiku_set_inhibit_double_buffering): Likewise. (haiku_create_tip_frame): New function. (Fx_create_frame): Remove tooltip specific code. (Fx_show_tip): Synchronize code with X. * src/haikuterm.c (haiku_new_font): Don't adjust size on tooltip frames. (haiku_read_socket): Draw internal border on tooltip frames during resize. (haiku_clear_under_internal_border): Handle cases where the face cache is NULL.
2022-01-18Fix system tooltips above menusPo Lu
* src/haikufns.c (Fx_show_tip): Disable frame reuse inside a menu. (syms_of_haikufns): New symbol `tooltip-reuse-hidden-frame'.
2022-01-18Allow non-system tooltips to display above menus on HaikuPo Lu
* doc/emacs/haiku.texi (Haiku Basics): Document that tooltips can now be displayed above the menu bar. * lisp/tooltip.el (tooltip-show-help): Only display help text in the echo area if Haiku system tooltips are enabled. * src/haiku_support.cc (FlipBuffers): Stop flushing view. * src/haikufns.c (Fx_show_tip): Fix a sizing bug leading to tooltips needing two redisplays to display correctly. * src/haikuterm.c (haiku_read_socket): Ignore resize events on tooltips.
2022-01-17Revert "Add undelete-frame-max instead of undelete-frame-mode (bug#51883)"Eli Zaretskii
This reverts commit 714e11d53534416b6519396a9df5d62054731810. That commit was unilateral and disregarded past discussions.
2022-01-17Fix Emacs icon not appearing on HaikuPo Lu
* lib-src/be_resources.cc (main): Scale input bitmap appropriately before setting it as the mini and large icons. * src/Makefile.in (Emacs): Add dependency on `lib-src/be-resources'.
2022-01-17Use BControlLook to determine scroll bar size on HaikuPo Lu
* src/haiku_support.cc (BScrollBar_default_size): Use BControlLook instead of legacy constants.
2022-01-17Display override redirect frames in all workspaces on HaikuPo Lu
* src/haiku_support.cc (class EmacsWindow): New field `pre_override_redirect_workspaces'. (BWindow_set_override_redirect): Set window to display on all workspaces.
2022-01-17* src/haikufns.c (Fx_show_tip): Sync after making window visible.Po Lu
2022-01-17Really eliminate tooltip flicker on HaikuPo Lu
* src/haikufns.c (tip_frame): Make non-static. * src/haikuterm.c (haiku_read_socket): Ignore motion events that didn't actually move when a tip frame is visible. * src/haikuterm.h (tip_frame): Declare.
2022-01-17Translate timestamps when using GTK native inputPo Lu
* src/gtkutil.c (xg_widget_key_press_event_cb): Use timestamp specified in key event. (xg_filter_key): Translate timestamps.
2022-01-17Exercise wire right after event is filtered for native inputPo Lu
* src/xterm.c (handle_one_xevent): Run a no-op immediately after an event was filtered by GDK.
2022-01-16Add undelete-frame-max instead of undelete-frame-mode (bug#51883)Juri Linkov
* doc/emacs/frames.texi (Frame Commands): Replace undelete-frame-mode with undelete-frame-max. * lisp/frame.el (undelete-frame-max): New defcustom, by default 1. (undelete-frame--handle-delete-frame): Use undelete-frame-max instead of hard-coded 16. (undelete-frame-mode): Remove function. (after-init-hook): Add hook undelete-frame--handle-delete-frame to delete-frame-functions using after-init-hook to not store the initial frame. (undelete-frame): Remove undelete-frame-mode. Use undelete-frame-max instead of hard-coded 16. * lisp/menu-bar.el (menu-bar-file-menu): Remove menu item undelete-frame-mode. * src/frame.c (Fdelete_frame): Replace `undelete-frame-mode' with `undelete-frame-max' in the docstring.
2022-01-16Fix XI2 event filtering for very old versions of libXiPo Lu
* src/xterm.c (handle_one_xevent): Handle cases where xev->display is NULL.
2022-01-16Fix the xft buildPo Lu
* src/xsettings.h [!HAVE_PGTK]: Include dispextern.h and remove duplicate definition of Display_Info.
2022-01-16Use kMenuWindowFeel on Haiku toolkip windowsPo Lu
* src/haiku_support.cc (BWindow_set_tooltip_decoration): Use kMenuWindowFeel and set flags here. * src/haikufns.c (Fx_show_tip): Don't set_avoid_focus manually since setting tooltip decorations already does that.
2022-01-16Make help event generation on Haiku behave closer to XPo Lu
* src/haikuterm.c (haiku_read_socket): Generate help events more like how X does it.
2022-01-16Reduce poll time for Haiku file dialogsPo Lu
* src/haiku_support.c (be_popup_file_dialog): Reduce idle processor load by increasing timeout. The timeout is still too low to be noticable by the user.
2022-01-16* src/gtkutil.c (xg_widget_key_press_event_cb): Also raise input signal.Po Lu
2022-01-16* src/pgtkterm.c (evq_flush): Shift events one by oneYuuki Harano
2022-01-16Avoid focus and allow monospace text in tooltip frames on HaikuPo Lu
* src/haikufns.c (Fx_show_tip): Set avoid focus on tooltip frames. * src/haikuterm.c (haiku_default_font_parameter): Don't special case the default font on tooltip frames, since the bug that was supposed to work around has already been fixed.
2022-01-16Update modifier meanings even if an xkb_desc was not availablePo Lu
* src/xterm.c (handle_one_event): Always update modifiers after the keyboard mapping is refreshed.
2022-01-16* src/xwidget.c (webkit_js_to_lisp): Use correct constant to check size.Po Lu
2022-01-16Fix a minor snafu when resizing frames on HaikuPo Lu
* src/haiku_support.cc (BWindow_resize): Adjust for minor snafu where BWindow::ResizeTo uses BRect-style width and height instead of actual width and height.