1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 02:10:46 -08:00
Commit graph

44488 commits

Author SHA1 Message Date
Eli Zaretskii
c8e28813af Minor fixes for a recent commit
* src/xdisp.c (find_display_property): Fix style of comments.
(Fget_display_property): Doc fix.
(get_display_property): Fix style and whitespace.
2021-11-24 16:19:25 +02:00
Lars Ingebrigtsen
4bfa73f920 Make display_min_width work from the mode line
* src/xdisp.c (display_min_width): Make this work from mode line
constructs via display_string.
2021-11-24 14:48:17 +01:00
Po Lu
fc35928ec2 Make `yank-media' work on Haiku
This works with what WebPositive does with images, at least.  I don't
know about other programs, but Haiku doesn't seem to standardize this
very well.

* lisp/term/haiku-win.el (haiku--selection-type-to-mime): Handle
regular symbols.
(gui-backend-get-selection): Handle special type `TARGETS'.
(gui-backend-set-selection): Always clear clipboard.

* src/haiku_select.cc (BClipboard_get_targets): New function.
(BClipboard_set_data): New argument `clear'.  All callers
changed.
(BClipboard_set_system_data)
(BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data): New argument `clear'.

(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): New functions.

* src/haikuselect.c (haiku_selection_data_1): New function.
(Fhaiku_selection_targets): New function.
(Fhaiku_selection_put): Allow controlling if the clipboard is
cleared.
(syms_of_haikuselect): New symbols and subrs.

* src/haikuselect.h (BClipboard_set_system_data)
(BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data): New argument `clear'.

(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): New functions.
2021-11-24 12:58:39 +00:00
Lars Ingebrigtsen
fdafaf5e41 Fix min-width end condition handling
* src/xdisp.c (handle_display_prop): Fix check for min-width ends
-- they may be consecutive.
2021-11-24 12:44:55 +01:00
Po Lu
d30cdbbde4 Correct adjustments to frame widths in events
* src/haiku_support.cc (EmacsWindow.FrameResized)
(EmacsWindow.Zoom): Adjust widths to fit into the correct
coordinate system.
2021-11-24 11:16:44 +00:00
Po Lu
3a8e4f13fa Remove unused arguments to EmacsView.AfterResize
* src/haiku_support.cc (EmacsView.AfterResize): Remove
unused arguments.
(BView_resize_to): Stop passing unused arguments.
2021-11-24 11:16:44 +00:00
Lars Ingebrigtsen
a13b437c81 Add support for the min-width display property
* doc/lispref/display.texi (Display Property): Document
get-display-property.
(Other Display Specs): Document min-width property.

* src/dispextern.h (struct it): Add fields for min-width handling.

* src/xdisp.c (find_display_property, get_display_property): New
helper functions.
(display_min_width): Insert stretch glyphs based on the min width.
(Fget_display_property): New defun.
(handle_display_prop): Handle min-width ends.
(handle_single_display_spec): Handle min-width starts.
2021-11-24 11:55:58 +01:00
Alan Third
7e3c2b553f Allow NS to handle non-text clipboard contents
* src/nsselect.m (ns_get_foreign_selection): Handle non-plain text
clipboard entries.
(ns_string_from_pasteboard): Remove EOL conversion.
(syms_of_nsselect): Define QTARGETS.
2021-11-24 10:41:25 +00:00
Po Lu
e754973d4d Clear past end of frame on Haiku
* src/haiku_support.c (EmacsWindow.FrameResized): Delete
size adjustment.

* src/haikuterm.c (haiku_clear_frame): Clear one pixel
past the end of the frame.
2021-11-24 09:56:29 +00:00
Po Lu
3219518e5c Fix 1 pixel wide border in frames on Haiku
* src/haiku_support.cc (EmacsWindow.FrameResized): Add 1 to
pixel widths.

* src/haikuterm.c (haiku_read_socket): Use `lrint' to round
widths.
2021-11-24 09:38:26 +00:00
Po Lu
dc0ed8818b Remove extraneous code left over from the ftbe font driver
* src/haikuterm.c (syms_of_haikuterm): Remove dead code.
2021-11-24 01:46:33 +00:00
Po Lu
f90176b1ca Use only effective modifiers when handling XI2 button events
* src/xterm.c (handle_one_xevent): Use mods.effective when
constructing button events.
2021-11-24 09:09:45 +08:00
Eli Zaretskii
8b62b20159 Merge from origin/emacs-28
bdb489a ; * etc/DEBUG: Adjust instructions for libgccjit reproducer.
b4fb381 ; * src/xdisp.c (produce_stretch_glyph): Avoid compilation wa...
2021-11-23 15:11:16 +02:00
Eli Zaretskii
b4fb381d8d ; * src/xdisp.c (produce_stretch_glyph): Avoid compilation warning. 2021-11-23 14:37:53 +02:00
Po Lu
5c4136f564 Fix compilation with XInput 2 but without XKB
* src/xterm.c (handle_one_xevent): Remove extraneous
conditional.
2021-11-23 17:57:09 +08:00
Stefan Kangas
4c5efda8d3 Merge from origin/emacs-28
d791cd556d Fix '(space :relative-width N)' display spec w/non-ASCII c...
712898210f * lisp/proced.el (proced-sort-header): Fix event positions...

# Conflicts:
#	lisp/proced.el
2021-11-23 08:49:49 +01:00
Po Lu
2955d46c00 Only reset scroll valuators on real enter events
* src/xterm.c (handle_one_xevent): Test event detail and mode
before resetting scroll valuators.
2021-11-23 11:08:45 +08:00
Po Lu
da3db6a15d Fix delay between tool bar clicks and visual feedback
* src/haikuterm.c (haiku_read_socket): Redisplay after tool
bar click.
2021-11-23 01:20:15 +00:00
Po Lu
919cb31cf7 Fix XI2 keysym translation
* src/xterm.c (handle_one_xevent): Handle XI_KeyPress events
that can't be translated into strings.
2021-11-23 09:04:40 +08:00
Stefan Monnier
0601afcf7c src/indent.c, src/xdisp.c: Questions about with_echo_area_buffer_unwind_data 2021-11-22 14:06:14 -05:00
Eli Zaretskii
d791cd556d Fix '(space :relative-width N)' display spec w/non-ASCII chars
* src/xdisp.c (produce_stretch_glyph): Use the correct face for
non-ASCII characters.  Support :relative-width display spec on
Lisp strings, not just on buffer text.
2021-11-22 20:00:48 +02:00
Po Lu
3db3d5a398 Fix compiler warning in image.c
* src/image.c (webp_load): Initialize `mask_img' to NULL.
2021-11-22 11:13:55 +00:00
martin rudalics
61c254cafc Add new function buffer-text-pixel-size
* doc/lispref/display.texi (Size of Displayed Text): Document it.

* lisp/emacs-lisp/subr-x.el (string-pixel-width): Use
buffer-text-pixel-size (bug#51995).

* src/xdisp.c (window_text_pixel_size): Factor out from
Fwindow_text_pixel_size.
(Fbuffer_text_pixel_size): New function.
2021-11-22 12:02:42 +01:00
Po Lu
c7699b9702 Fix mouse movement event generation on Haiku
* src/haikuterm.c (haiku_mouse_position): Set timestamp.
(haiku_read_socket): Set last_mouse_movement_time.

* src/haikuterm.h (struct haiku_display_info): Add field
`last_mouse_movement_time'.
2021-11-22 07:10:57 +00:00
Po Lu
9d8a2832e8 Don't set button event modifiers twice on Haiku
* src/haikuterm.c (haiku_read_socket): Simplify.
2021-11-22 06:33:22 +00:00
Po Lu
8aea4721d9 Move XI2 event filtering to a more appropriate location
* src/xterm.c (handle_one_xevent): Filter all key press events
even if no frame is found.
2021-11-22 14:09:44 +08:00
Po Lu
5fcff0d2cb Use more precise test for emulated wheel events in XI2
* src/xterm.c (handle_one_xevent): Ignore button events
that have XIPointerEmulated set.
2021-11-22 13:24:59 +08:00
Po Lu
9324efac48 Make `xwidget-display-event' a special event as well
* doc/lispref/commands.texi (Xwidget Events): Document that
`xwidget-display-event' is a special event, and that it should
be handled through callbacks.

* etc/NEWS: Update NEWS entry.

* lisp/xwidget.el (xwidget-webkit-new-session)
(xwidget-webkit-import-widget): Attach display callback.
(xwidget-webkit-display-event): Call display callback instead.
(xwidget-webkit-display-callback): New function.

* src/keyboard.c (make_lispy_event): Store
source information for XWIDGET_DISPLAY_EVENT correctly.

* src/xwidget.c (store_xwidget_display_event): Store
source of the display request.
(webkit_ready_to_show): Store source if available.
(webkit_create_cb_1): Store source if available.
(kill_xwidget): Remove dead widget from internal_xwidget_list.
2021-11-22 10:47:29 +08:00
Po Lu
4eb228bfac Also filter XI_KeyRelease events
* src/xterm.c (handle_one_xevent): Also filter XI_KeyRelease
events through the X input method.
2021-11-22 09:40:47 +08:00
Po Lu
a4ac609098 Use only effective modifiers for XI2 key press events
* src/xterm.c (handle_one_xevent): Use only effective modifiers
in XI_KeyPress events.
2021-11-22 09:34:39 +08:00
Eli Zaretskii
b7db7eb2c7 Fix positioning of pop-up menus when there are window-margins
* src/menu.c (x_popup_menu_1): Calculate X and Y correctly for
clicks in the text area.  (Bug#51782)
2021-11-21 19:07:10 +02:00
Robert Pluim
7c52c86a84 ; Fix a few haiku typos
* lisp/net/browse-url.el (browse-url-webpositive-program): Correct
:version tag.
* src/frame.c (Fframep): Fix quoting of "haiku".
2021-11-21 16:04:31 +01:00
Eli Zaretskii
2716146e6c Minor cleanup in w32inevt.c
* src/w32inevt.c (w32_console_mouse_position, mouse_moved_to)
(do_mouse_event): Use 'get_frame' to obtain the frame pointer.
2021-11-21 16:57:12 +02:00
Po Lu
6d90444ba0 Fix double and triple click in Haiku.
* src/haikuterm.c (haiku_read_socket): Record timestamp
in events.
2021-11-21 13:14:06 +00:00
Po Lu
f1ee5c6702 Report time in XInput 2 button events
* src/xterm.c (handle_one_xevent): Report time in XI button
events.
2021-11-21 21:07:58 +08:00
Po Lu
e22c37aa87 Fix horizontal wheel events on Haiku
* src/haikuterm.c (haiku_read_socket): Fix modifier
calculation for horizontal wheel events.
2021-11-21 12:43:53 +00:00
Stefan Kangas
1de6a86553 Merge from origin/emacs-28
0dd3883def Update to Org 9.5-72-gc5d6656
e3d5337970 Fix mouse handling with several TTY frames on MS-Windows
7e437af413 Fix temacs invocation from outside of the 'src' directory
0fbfd4253e ; Avoid byte-compilation warnings in edmacro.el
c22c988b1f Fix mouse events on tab bar or tool bar when 'track-mouse'...
354c834fba Fix `browse-url-interactive-arg' for certain kinds of events

# Conflicts:
#	lisp/mouse.el
2021-11-21 11:18:23 +01:00
Po Lu
f094120360 Implement `pick_embedded_child' for offscreen xwidgets
* src/xwidget.c (pick_embedded_child): New function.
(Fmake_xwidget): Connect `pick-embedded-child' signal
to offscreen window.
2021-11-21 17:39:29 +08:00
Po Lu
2a4a32eddb Fix documentation string of x_coalesce_scroll_events
* src/xterm.c (x_coalesce_scroll_events): Update doc string to
reflect that this option is now supported under Haiku.
2021-11-21 08:06:27 +00:00
Eli Zaretskii
f2730520ce Improve the fix for bug#51864
* src/xfaces.c (face_at_buffer_position): Call
FACE_FROM_ID_OR_NULL just once.
(face_at_string_position): Make sure we have a usable base face.
2021-11-21 09:52:43 +02:00
Po Lu
a81fbf8367 Fix compiler warnings
* src/haikuterm.c (haiku_read_socket): Fix compiler
warnings intoduced by last change.
2021-11-21 03:48:27 +00:00
Po Lu
677859b7af Add pixel delta support for wheel events on Haiku
* src/haiku_support.cc (EmacsWindow.MessageReceived): Stop
adjusting scroll deltas.
* src/haikuterm.c (haiku_read_socket): Handle pixel deltas
correctly.
2021-11-21 03:40:36 +00:00
Po Lu
b6570602cc Attach download-started signals to correct WebKit context
* src/xwidget.c (Fmake_xwidget): Use correct context.
2021-11-21 11:14:14 +08:00
Po Lu
39f3604e22 Allow handling smooth scroll events in xwidgets
* src/xterm.c (handle_one_xevent): Pass through XI2 motion
events to xwidgets.
* src/xterm.c (xwidget_button): Don't handle legacy scroll
events on XInput 2.
(xwidget_motion_notify, xwidget_scroll): New functions.
2021-11-21 11:06:02 +08:00
Po Lu
f16bb8693f Select device notification events correctly
* src/xfns.c (setup_xi_event_mask): Select PropertyEvent,
HierarchyChanged and DeviceChanged for all devices.
2021-11-21 09:32:46 +08:00
Po Lu
b60c2a5d85 Add XInput 2 input method support
* src/xterm.c (handle_one_xevent): Let input methods filter
events first before trying to handle an XI2 key press event.
2021-11-21 09:22:31 +08:00
Eli Zaretskii
e3d5337970 Fix mouse handling with several TTY frames on MS-Windows
* src/w32inevt.c (do_mouse_event): Reset the 'mouse_moved' flag of
the selected frame.  Without that, this flag might remain set on a
TTY frame that is not displayed.
2021-11-20 20:08:06 +02:00
Eli Zaretskii
7e437af413 Fix temacs invocation from outside of the 'src' directory
* src/emacs.c (main) [HAVE_NATIVE_COMP]: Recompute the value of
native-comp-eln-load-path if about to load loadup in uninitialized
Emacs.  (Bug#51999)
2021-11-20 18:17:59 +02:00
Po Lu
85a078e785 Add support for the Haiku operating system and its window system
* .gitignore: Add binaries specific to Haiku.

* Makefie.in (HAVE_BE_APP): New variable.
(install-arch-dep): Install Emacs and Emacs.pdmp when
using Haiku.

* configure.ac: Detect and configure for Haiku and
various related configurations.
(be-app, be-freetype, be-cairo): New options.
(HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ)
(HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(HAIKU, HAVE_TINY_SPEED_T): New define.
(emacs_config_features): Add BE_APP.

* doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku
appendix.

* doc/emacs/emacs.texi: Add Haiku appendix to menus and
include it.

* doc/emacs/haiku.texi: New Haiku appendix.

* doc/lispref/display.texi (Defining Faces, Window Systems):
Explain meaning of `haiku' as a window system identifier.
(haiku-use-system-tooltips): Explain meaning of system
tooltips on
Haiku.

* doc/lispref/frames.texi (Multiple Terminals): Explain
meaning of haiku as a display type.
(Frame Layout): Clarify section for Haiku frames.
(Size Parameters): Explain limitations of fullwidth and
fullheight on Haiku.
(Management Parameters): Explain limitations of
inhibiting double buffering on builds with Cairo,
and the inability of frames with no-accept-focus to
receive keyboard input on Haiku.
(Font and Color Parameters): Explain the different font
backends available on Haiku.
(Raising and Lowering): Explain that lowering and
restacking frames doesn't work on Haiku.
(Child Frames): Explain oddities of child frame
visibility on Haiku.

* doc/lispref/os.texi (System Environment): Explain
meaning of haiku.
* etc/MACHINES: Add appropriate notices for Haiku.
* etc/NEWS: Document changes.
* etc/PROBLEMS: Document font spacing bug on Haiku.

* lib-src/Makefile.in: Build be-resources binary on
Haiku.
(CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS)
(HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables.
(DONT_INSTALL): Add be-resources binary if on Haiku.
(be-resources): New target.

* lib-src/be_resources: Add helper binary for setting
resources on the Emacs application.

* lib-src/emacsclient.c (decode_options): Set
alt_display to "be" on Haiku.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-unraised, custom-button-pressed): Update
face definitions for Haiku.

* lisp/cus-start.el: Add haiku-debug-on-fatal-error and
haiku-use-system-tooltips.

* lisp/faces.el (face-valid-attribute-values): Clarify
attribute comment for Haiku.
(tool-bar): Add appropriate toolbar color for Haiku.

* lisp/frame.el (haiku-frame-geometry)
(haiku-mouse-absolute-pixel-position)
(haiku-set-mouse-absolute-pixel-position)
(haiku-frame-edges)
(haiku-frame-list-z-order): New function declarations.

(frame-geometry, frame-edges)
(mouse-absolute-pixel-position)
(set-mouse-absolute-pixel-position)
(frame-list-z-order): Call appropriate window system
functions on Haiku.

(display-mouse-p, display-graphic-p)
(display-images-p, display-pixel-height)
(display-pixel-width, display-mm-height)
(display-mm-width, display-backing-store)
(display-save-under, display-planes)
(display-color-cells, display-visual-class): Update type
tests for Haiku.

* lisp/international/mule-cmds.el
(set-coding-system-map): Also
prevent set-terminal-coding-system from appearing in the menu
bar on Haiku.

* lisp/loadup.el: Load Haiku-specific files when built
with Haiku, and don't rename newly built Emacs on Haiku as BFS
doesn't support hard links.

* lisp/menu-bar.el (menu-bar-open): Add for Haiku.

* lisp/mwheel.el (mouse-wheel-down-event): Expect
wheel-up on Haiku.
(mouse-wheel-up-event): Expect wheel-down on Haiku.
(mouse-wheel-left-event): Expect wheel-left on Haiku.
(mouse-wheel-right-event): Expect wheel-right on Haiku.

* lisp/net/browse-url.el
(browse-url--browser-defcustom-type):
Add option for WebPositive.
(browse-url-webpositive-program): New variable.
(browse-url-default-program): Search for WebPositive.
(browse-url-webpositive): New function.

* lisp/net/eww.el (eww-form-submit, eww-form-file)
(eww-form-checkbox, eww-form-select): Define faces
appropriately for Haiku.

* lisp/term/haiku-win.el: New file.

* lisp/tooltip.el (menu-or-popup-active-p): New function
declaration.
(tooltip-show-help): Don't use tooltips on Haiku when a
menu is active.

* lisp/version.el (haiku-get-version-string): New
function declaration.
(emacs-version): Add Haiku version string if
appropriate.

* src/Makefile.in: Also produce binary named "Emacs"
with Haiku resources set.

(CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS)
(HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS)
(ALL_CXX_FLAGS): New variables.

(.SUFFIXES): Add .cc.
(.cc.o): New target.
(base_obj): Add Haiku C objects.
(doc_obj, obj): Split objects that should scanned for
documentation into doc_obj.
(SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects.
(all): Depend on Emacs and Emacs.pdmp on Haiku.
(LIBES): Add Haiku libraries.
(gl-stamp)
($(etc)/DOC): Scan doc_obj instead of obj
(temacs$(EXEEXT): Use C++ linker on Haiku.
(ctagsfiles3): New variable.
(TAGS): Scan C++ files.

* src/alloc.c (garbage_collect): Mark Haiku display.

* src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable
on Haiku.
(struct image): Add fields for Haiku transforms.
(RGB_PIXEL_COLOR): Define to unsigned long on Haiku as
well.
(sit_for): Also check USABLE_SIGPOLL.
(init_display_interactive): Set initial window system to
Haiku on Haiku builds.

* src/emacs.c (main): Define Haiku syms and init haiku
clipboard.
(shut_down_emacs): Quit BApplication on Haiku and
trigger debug
on aborts if haiku_debug_on_fatal_error.
(Vsystem_type): Update docstring.

* src/fileio.c (next-read-file-uses-dialog-p): Enable on
Haiku.

* src/filelock.c (WTMP_FILE): Only define if BOOT_TIME
is also defined.

* src/floatfns.c (double_integer_scale): Work around
Haiku libroot brain damage.

* src/font.c (syms_of_font): Define appropriate font
driver symbols for Haiku builds with various options.

* src/font.h: Also enable ftcrfont on Haiku builds with
Cairo.
(font_data_structures_may_be_ill_formed): Also enable on
Haiku builds that have Cairo.

* src/frame.c (Fframep): Update doc-string for Haiku
builds and return haiku if appropriate.
(syms_of_frame): New symbol `haiku'.

* src/frame.h (struct frame): Add output data for Haiku.
(FRAME_HAIKU_P): New macro.
(FRAME_WINDOW_P): Test for Haiku frames as well.

* src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG): New macros.
(ftcrfont_draw): Add haiku specific code for Haiku
builds with Cairo.

* src/ftfont.c (ftfont_open): Set face.
(ftfont_has_char, ftfont_text_extents): Work around
crash.
(syms_of_ftfont): New symbol `mono'.

* src/ftfont.h (struct font_info): Enable Cairo-specific
fields for Cairo builds on Haiku.

* src/haiku_draw_support.cc:
* src/haiku_font_support.cc:
* src/haiku_io.c:
* src/haiku_select.cc:
* src/haiku_support.cc:
* src/haiku_support.h:
* src/haikufns.c:
* src/haikufont.c:
* src/haikugui.h:
* src/haikuimage.c:
* src/haikumenu.c:
* src/haikuselect.c:
* src/haikuselect.h:
* src/haikuterm.c:
* src/haikuterm.h: Add new files for Haiku windowing
support.

* src/haiku.c: Add new files for Haiku operating system
support.

* src/image.c: Implement image transforms and native XPM
support
on Haiku.

(GET_PIXEL, PUT_PIXEL, NO_PIXMAP)
(PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG)
(BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG)
(BLUE16_FROM_ULONG): Define to appropriate values on
Haiku.

(image_create_bitmap_from_data): Add Haiku support.
(image_create_bitmap_from_file): Add TODO on Haiku.
(free_bitmap_record): Free bitmap on Haiku.
(image_size_in_bytes): Implement for Haiku bitmaps.
(image_set_transform): Implement on Haiku.
(image_create_x_image_and_pixmap_1): Implement on Haiku,
24-bit or 1-bit only.
(image_destroy_x_image, image_get_x_image): Use correct
img and pixmap values on Haiku.
(lookup_rgb_color): Use correct macro on Haiku.
(image_to_emacs_colors): Implement on Haiku.
(image_disable_image): Disable on Haiku.
(image_can_use_native_api): Test for translator presence
on Haiku.
(native_image_load): Use translator on Haiku.
(imagemagick_load_image): Add Haiku-specific quirks.
(Fimage_transforms_p): Allow rotate90 on Haiku.
(image_types): Enable native XPM support on Haiku.
(syms_of_image): Enable XPM images on Haiku.

* src/keyboard.c (kbd_buffer_get_event)
(handle_async_input, handle_input_available_signal)
(handle_user_signal, Fset_input_interrupt_mode)
(init_keyboard): Check for USABLE_SIGPOLL along with
USABLE_SIGIO.

* src/lisp.h (pD): Work around broken Haiku headers.
(HAVE_EXT_MENU_BAR): Define on Haiku.
(handle_input_available_signal): Enable if we just have
SIGPOLL as well.

* src/menu.c (have_boxes): Return true on Haiku.
(single_menu_item): Enable toolkit menus on Haiku.
(find_and_call_menu_selection): Also enable on Haiku.

* src/process.c (keyboard_bit_set): Enable with only
usable SIGPOLL.
(wait_reading_process_output): Test for SIGPOLL as well
as SIGIO availability.

* src/sound.c (sound_perror, vox_open)
(vox_configure, vox_close): Enable for usable SIGPOLL as
well.

* src/sysdep.c (sys_subshell): Enable for usable SIGPOLL.
(reset_sigio): Make conditional on F_SETOWN.
(request_sigio, unrequest_sigio)
(emacs_sigaction_init): Also handle SIGPOLLs.
(init_sys_modes): Disable TCXONC usage on Haiku, as it
doesn't have any ttys other than pseudo ttys, which don't
support C-s/C-q flow control, and causes compiler warnings.
(speeds): Disable high speeds if HAVE_TINY_SPEED_T.

* src/termhooks.h (enum output_method): Add output_haiku.
(struct terminal): Add Haiku display info.
(TERMINAL_FONT_CACHE): Enable for Haiku.

* src/terminal.c (Fterminal_live_p): Return `haiku' if
appropriate.
* src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging
variables.

* src/xdisp.c (redisplay_internal)
(note_mouse_highlight): Return on Haiku if a popup is activated.
(display_menu_bar): Return on Haiku if frame is a Haiku
frame.

* src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku.
(x_create_gc): Enable dummy GC code on Haiku.

* src/xfns.c (x-server-version, x-file-dialog): Add
Haiku specifics to doc strings.

* src/xterm.c (syms_of_xterm): Add Haiku information to
doc string.
2021-11-20 21:46:07 +08:00
Po Lu
7294a2861d Prevent crashes when scrolling in an unknown Window on XI2
* src/xterm.c (handle_one_xevent): Fix XI2 frame lookup to
handle foreign windows.
2021-11-20 20:00:45 +08:00