summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-05-02Wait for events from all displays in Xm dialogs even on XI2Po Lu
* src/xfns.c (Fx_file_dialog): Always process events from all displays.
2022-05-02Fix handling double-click-time nil or tStefan Kangas
* lisp/mouse.el (mouse-double-click-time): New function to always return a number for `double-click-time'. * lisp/emulation/viper-mous.el (viper-multiclick-timeout): * lisp/foldout.el (foldout-mouse-swallow-events): * lisp/help.el (help--read-key-sequence): * lisp/org/org-mouse.el (org-mouse-show-context-menu): Use 'mouse-double-click-time' instead of 'double-click-time'. * src/keyboard.c (syms_of_keyboard): Mention 'mouse-double-click-time' in doc string of 'double-click-time'. * test/lisp/mouse-tests.el (mouse-test-mouse-double-click-time): New test.
2022-05-02Fix inconsistencies in Haiku font selection dialogPo Lu
* src/haiku_font_support.cc (font_family_style_matches_p): Fix coding style. * src/haikufont.c (haikufont_pattern_from_object): Set slant and width using correct object.
2022-05-02Fix handling of some weights in the Haiku font driverPo Lu
* src/haiku_font_support.cc (font_style_to_flags): * src/haiku_support.h (enum haiku_font_weight): * src/haikufont.c (haikufont_weight_to_lisp) (haikufont_lisp_to_weight): Make `ultralight' and `extralight' mean the same thing.
2022-05-02Improve font dialog on macOSPo Lu
* src/nsterm.m ([EmacsView changeFont:]): Don't exit loop here on macOS. ([EmacsView noteUserSelectedFont]): New function. ([EmacsView showFontPanel]): Add explicit "OK" button on macOS.
2022-05-02Default to currently selected font in Haiku font dialogsPo Lu
* src/haiku_font_support.cc (be_find_font_indices): New function. * src/haiku_support.cc (class EmacsFontSelectionDialog) (UpdateStylesForIndex, EmacsFontSelectionDialog): Allow specifying an initial font family and style. (be_select_font): New parameters `initial_family' and `initial_style'. * src/haiku_support.h: Update prototypes. * src/haikufont.c (haikufont_lisp_to_weight) (haikufont_lisp_to_slant, haikufont_lisp_to_width): Handle `regular'. (haikufont_pattern_from_object): New function. (haikufont_spec_or_entity_to_pattern): Fix coding style. (Fx_select_font): Compute indices based on currently selected font. (syms_of_haikufont): New defsyms.
2022-05-02Fix race conditions with async input in some Haiku dialogsPo Lu
* src/haikufns.c (Fhaiku_save_session_reply): * src/haikufont.c (Fx_select_font): Block sigio around system calls.
2022-05-02Fix the macOS buildPo Lu
* src/nsterm.m (ns_font_desc_to_font_spec, syms_of_nsterm): Define missing symbols that are only on GNUstep.
2022-05-02Make the NS font dialog return more correct valuesPo Lu
* src/nsfns.m (Fx_select_font): Update doc string. * src/nsterm.m (ns_font_desc_to_font_spec): New function. ([EmacsView showFontPanel]): Return selected font as a font spec instead.
2022-05-02Fix devices staying disabled in some casesPo Lu
* src/xterm.c (handle_one_xevent): Process queued disables before handling an XIDeviceEnabled situation.
2022-05-01Replace NS code that implemented font panels in a different wayPo Lu
* doc/emacs/macos.texi (Mac / GNUstep Events): Document removal of `ns-change-font' event. The font panels are now implemented normally, via `x-select-font'. * lisp/term/common-win.el (x-setup-function-keys): Likewise. * lisp/term/ns-win.el (global-map, ns-popup-font-panel): Remove. (x-select-font, mouse-set-font, ns-input-font): (ns-input-fontsize): Remove. (ns-respond-to-change-font): Delete function. * src/nsfns.m (Fns_popup_font_panel): Delete function. (Fx_select_font): New function. (syms_of_nsfns): Update subrs. * src/nsterm.h (@interface EmacsView): * src/nsterm.m (ns_select_1): New function. (ns_select): Wrap around that instead. ([EmacsView changeFont:]): Exit nested event loop ([EmacsView showFontPanel:]): New function.
2022-05-01Make scroll-other-window respect target window remappingsLars Ingebrigtsen
* lisp/window.el (scroll-other-window, scroll-other-window-down): Moved from window.c and change implementation so that they respect command remappings in the target window (bug#20236).
2022-05-01Improve documentation of 'malloc-trim'Eli Zaretskii
* src/alloc.c (Fmalloc_trim): Fix the doc string. * etc/NEWS: Document which systems support 'malloc-trim'.
2022-05-01Add new function `malloc-trim'Lars Ingebrigtsen
* configure.ac (PGTK_LIBS): Check for malloc_trim. * src/alloc.c (Fmalloc_trim): Add new function (bug#45200).
2022-05-01Fix specifying zero as a size for fonts on HaikuPo Lu
* src/haiku_support.cc (MessageReceived): Set `size_specified' correctly.
2022-05-01Improve display of Haiku font dialogPo Lu
* src/haiku_support.cc (EmacsFontSelectionDialog) (class EmacsFontSelectionDialog, FrameResized): Set minimum size based on individual view dimensions and add label to size control. (BWindow_set_min_size): Delete function. * src/haiku_support.h: Update prototypes. * src/haikuterm.c (haiku_update_size_hints): Stop setting min size, since that doesn't work correctly on Haiku.
2022-05-01Allow specifying font size in the Haiku font selection dialogPo Lu
* src/haiku_support.cc (struct font_selection_dialog_message): New fields `size' and `size_specified'. (class EmacsFontSelectionDialog): New `size_entry' control. (MessageReceived): Set size from that control if available. (EmacsFontSelectionDialog): Initialize that control. (FrameResized): Handle layout for that control. (be_select_font): New field `size'. * src/haiku_support.h: Update prototypes. * src/haikufont.c (Fx_select_font): Populate font spec with size.
2022-05-01Allow quitting inside font selection dialogs on HaikuPo Lu
* src/haiku_support.cc (WaitForChoice): Accept new function for checking quit flag. (be_select_font): Pass that function. * src/haiku_support.h: Update prototypes. * src/haikufont.c (haikufont_should_quit_popup): New function. (Fx_select_font): Give said function to `be_select_font'.
2022-05-01Allow invoking fonts in the Haiku font dialogPo Lu
* src/haiku_support.cc (MessageReceived): Handle invocations. (EmacsFontSelectionDialog): Set style panel invocation message.
2022-05-01Improvements to the Haiku font dialogPo Lu
* src/haiku_support.cc (class EmacsFontSelectionDialog) (EmacsFontSelectionDialog, FrameResized): Fix colors and respect monospace only. (be_select_font): New parameter `allow_monospace_only'. * src/haiku_support.h: Update prototype. * src/haikufont.c (Fx_select_font): Respect `exclude-proportional'.
2022-05-01Also fix some compiler warnings in xterm.c that didn't show upPo Lu
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't define unused variable on GTK builds.
2022-05-01Fix the GTK buildPo Lu
* src/xterm.c (x_dnd_begin_drag_and_drop): Let GTK handle events again.
2022-05-01* src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo.Po Lu
2022-05-01Fix processing events from multiple displays during DNDPo Lu
* src/xterm.c (x_next_event_from_any_display): New function. Only used on no-toolkit builds. (x_dnd_begin_drag_and_drop): Compute correct dpyinfo for handle_one_xevent.
2022-05-01Clean up X Windows tooltip codePo Lu
* src/xfns.c (x_hide_tip): Remove "bloodcurdling hack". * src/xterm.c (handle_one_xevent): Add a better version here instead. The code is unlikely to be hit as well, since tooltip frames are typically deleted, not just hidden.
2022-05-01Implement font selection dialog on HaikuPo Lu
* src/haiku_font_support.cc (font_style_to_flags): Handle style allocation failures. (be_font_style_to_flags): New function. * src/haiku_support.cc (struct font_selection_dialog_message): New struct. (class EmacsFontSelectionDialog): New class. (be_select_font): New function. * src/haiku_support.h: Update prototypes. * src/haikufont.c (Fx_select_font): New function. (syms_of_haikufont): Define new subr.
2022-04-30Fix Vx_show_tooltip_timeout in ns build, tooLars Ingebrigtsen
* src/nsfns.m (Fx_show_tip): Respect Vx_show_tooltip_timeout here, too.
2022-04-30Fix compilation after recent x-show-tooltip-timeout changesLars Ingebrigtsen
* src/dispnew.c (syms_of_display): Move x-show-tooltip-timeout to a common file to avoid breaking other systems.
2022-04-30Use x-show-tooltip-timeout in all the implementationsLars Ingebrigtsen
* src/haikufns.c (Fx_show_tip): Use the timeout variable. * src/pgtkfns.c (Fx_show_tip): Ditto. * src/w32fns.c (Fx_show_tip): Ditto. * src/xfns.c (Fx_show_tip): Doc fix.
2022-04-30Don't hard code the default x-show-tip timeoutLars Ingebrigtsen
* src/xfns.c (Fx_show_tip): Use it. (syms_of_xfns): Add a new x-show-tooltip-timeout variable (bug#23341).
2022-04-30Fix some cases of flicker on MS WindowsPo Lu
* src/w32term.c (w32_read_socket): Fix typo in check before flipping buffers.
2022-04-30Fix display updating inside the minibuffer on MS WindowsPo Lu
* src/minibuf.c (read_minibuf): Call `w32_flip_buffers_if_dirty' after changing the cursor position and redisplaying instead of `flush_frame'. (bug#55193) * src/w32term.c (w32_flip_buffers_if_dirty): New function. * src/w32term.h: Update prototypes.
2022-04-30Avoid server roundtrip on wheel events from scroll bars on XI2Po Lu
* src/xterm.c (handle_one_xevent): Translate coordinates for scroll bars correctly when handling XI2 wheel events.
2022-04-30; * src/w32term.c (w32_read_socket): Add comment for recent change.Eli Zaretskii
2022-04-30; Minor fixes of documentation of double-buffering on MS-WindowsEli Zaretskii
* etc/NEWS: Improve and expand wording of the entry about double-buffering on MS-Windows. * src/w32fns.c (w32_set_inhibit_double_buffering): Fix commentary.
2022-04-30Process editres events not for frames correctlyPo Lu
* src/xterm.c (handle_one_xevent): Dispatch Editres events to interested widgets.
2022-04-30Adjustments to double buffering on MS WindowsPo Lu
* src/w32fns.c (w32_set_inhibit_double_buffering): Add comment describing double buffering. (w32_wnd_proc): Respect `w32-disable-double-buffering'. (globals_of_w32fns): New variable `w32-disable-double-buffering'. * src/w32term.c (w32_show_back_buffer): Return immediately if double buffering is disabled on the frame. (w32_scroll_run): Use old scrolling code if `w32-disable-double-buffering' is enabled. (w32_scroll_bar_clear): Document why we don't clear scroll bars when double buffering is enabled. (w32_read_socket): Respect `w32-disable-double-buffering' and clean up some code. * src/w32xfns.c (get_frame_dc): Respect `w32-disable-double-buffering'.
2022-04-30Handle exposure in the widget's expose proc on XPo Lu
* src/widget.c (emacsFrameClassRec): Don't inherit expose proc. (get_default_char_pixel_size): (pixel_to_char_size): (char_to_pixel_size): (round_size_to_char): (EmacsFrameInitialize): (EmacsFrameRealize): (EmacsFrameResize): Clean up coding style. (EmacsFrameExpose): New function. Expose the frame here to satisfy the toolkit when it calls the expose proc by hand. * src/xterm.c (handle_one_xevent): Handle exposure through the widget instead.
2022-04-30Fix releasing the mouse on top of the tool bar on MS WindowsPo Lu
* src/w32term.c (w32_read_socket): Don't handle tool bar clicks specially for button up events if no tool bar item was previously pressed.
2022-04-30Fix palette freeing on MS Windows with double bufferingPo Lu
* src/w32term.c (w32_release_paint_buffer): Also release target DC palette.
2022-04-30Implement double buffering on MS WindowsPo Lu
* etc/NEWS: Announce changes. * src/w32fns.c (w32_set_inhibit_double_buffering): New function. (w32_wnd_proc): (Fx_create_frame): (w32_create_tip_frame): Set `inhibit-double-buffering' parameter. (w32_frame_parm_handlers): Add new handler. * src/w32term.c (w32_show_back_buffer): (w32_release_paint_buffer): New functions. (w32_frame_up_to_date): Show back buffer if applicable. (w32_buffer_flipping_unblocked_hook): New hook. (w32_scroll_run): Use BitBlt to scroll instead of window scrolling functions. (w32_scroll_bar_clear): Don't clear scroll bars when double buffered. (w32_read_socket): Flip buffers after reading input events in some cases. (w32_free_frame_resources): Free back buffer. (w32_create_terminal): Add new hook. * src/w32term.h (struct w32_output): New fields for handling back buffers. * src/w32xfns.c (select_palette): Fix indentation. (get_frame_dc, release_frame_dc): Return back buffer when appropriate and set dirty flag.
2022-04-30Prevent cursors from being set on tooltip frames on HaikuPo Lu
* src/haikuterm.c (haiku_show_hourglass, haiku_hide_hourglass) (haiku_define_frame_cursor, haiku_toggle_invisible_pointer): Ignore tooltip frames. Otherwise, the cursor changes every time a tooltip is mapped.
2022-04-29* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add `symbol-with-pos`Stefan Monnier
2022-04-30Fix focus reversion of Motif menus on XI2Po Lu
* src/xmenu.c (create_and_show_popup_menu): Stop setting input focus on the menu window.
2022-04-30Fix mouse face bugs on MotifPo Lu
* src/xterm.c (handle_one_xevent): Fix handling LeaveNotify events from Motif menus.
2022-04-30Check display when handling XdndFinished eventsPo Lu
* src/xterm.c (handle_one_xevent): Check that the display is actually the one we want before finishing DND.
2022-04-29Add new functions for computing character metrics for windowsTitus von der Malsburg
* doc/lispref/display.texi (Size of Displayed Text): Document the char functions. * doc/lispref/windows.texi (Window Sizes): Document window-max-characters-per-line. * lisp/window.el (window-char-pixel-width) (window-char-pixel-height) (window-max-characters-per-line): New functions (bug#19395).
2022-04-29Make timer_check even more resilientPip Cet
* src/keyboard.c (timer_check): Inhibit atimers while making the copy of the timer list (bug#21380). This prevents an extremely unlikely segfault.
2022-04-29Fix colorspace calculations on HaikuPo Lu
* src/haiku_support.cc (be_get_display_planes) (be_get_display_color_cells): Handle grayscale basic colorspaces correctly. (be_is_display_grayscale): New function. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_set_no_accept_focus, haiku_iconify_frame) (Fxw_display_color_p, Fxw_color_values, Fx_display_grayscale_p): Actually handle grayscale colorspaces. (Fx_display_pixel_width, Fx_display_pixel_height) (Fx_display_mm_height, Fx_display_mm_width): Clean up coding style. (Fx_display_visual_class): Handle grayscale colorspaces. (syms_of_haikufns): New defsyms.
2022-04-29Add helper function to remove title bar when maximizing framesLars Ingebrigtsen
* lisp/frame.el (toggle-frame-maximized): Mention it. (frame-hide-title-bar-when-maximized): New function (bug#31968). Adapted from code by Jonathan Kyle Mitchell. * src/window.c (syms_of_window): Mention it.