summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some extraneous stuff in pgtkfns.cPo Lu2022-04-151-27/+1
| | | | | | * src/pgtkfns.c (Fx_gtk_debug): Fix doc string and remove extra version check. (syms_of_pgtkfns): Delete left over defvar from NS port.
* Fix core string lookup with modifiers on XI2Po Lu2022-04-151-0/+10
| | | | | * src/xterm.c (handle_one_xevent): Clean modifiers from xkey.state before giving it to XLookupString.
* Clean up various bits of Haiku codePo Lu2022-04-156-735/+342
| | | | | | | | | | | | | | | | | | | | * src/haiku_font_support.cc (BFont_string_width): Delete unused function. * src/haiku_support.cc (BWindow_new): Clean up type of `view'. (BWindow_quit): Clean up coding style. (BView_mouse_down, BView_mouse_up, BView_mouse_moved): Delete unused functions. (unwind_popup_file_dialog): Clean up coding style. (be_popup_file_dialog_safe_set_target): Delete function. (be_popup_file_dialog): Improve code clarity. * src/haiku_support.h: Fix coding style. * src/haikufns.c (haiku_get_color, haiku_display_info_for_name) (check_haiku_display_info, Fhaiku_read_file_name) (Fx_display_save_under, Fhaiku_frame_restack): Remove references to "Be displays" and replace them with "Haiku displays". * src/haikuselect.h: Clean up coding style. * src/haikuterm.c (haiku_read_socket): Clean up coding style and fix a few latent bugs.
* Add missing extern declarations to headersPo Lu2022-04-151-2/+2
| | | | | * src/xterm.h (xi_device_from_id, xi_frame_selected_for): Add `extern' declaration.
* Make Haiku scroll bar behave more like other programsPo Lu2022-04-151-7/+13
| | | | | | | | * haiku_support.cc (class EmacsScrollBar): New field `repeater_start'. (Pulse): Wait for time to pass repeater_delay. (MouseDown): Set it to the current time + the system repeater delay.
* New time-equal-p testPaul Eggert2022-04-141-1/+2
| | | | * test/src/timefns-tests.el (time-equal-p-NaN-NaN): New test.
* Properly wait for app thread exit on HaikuPo Lu2022-04-153-56/+31
| | | | | | | | | | | | * src/haiku_support.cc (MessageReceived): Handle QUIT_APPLICATION. (start_running_application): Clean up code a little. (wait_for_exit_of_app_thread): New function. (BApplication_setup): Add atexit handler to clean up app thread. (be_app_quit): Delete function. * src/haikuterm.c (haiku_delete_terminal): Un-implement function. * src/haikuterm.h: Update prototypes.
* Fix calls to XKB functions without testing for server supportPo Lu2022-04-151-6/+9
| | | | | | * src/xterm.c (x_dnd_cleanup_drag_and_drop): (x_dnd_begin_drag_and_drop): Never call XkbSelectEvents if the X server doesn't have XKB.
* Fix mouse clicks in hscrolled window with variable-height fontsEli Zaretskii2022-04-141-0/+12
| | | | | | * src/xdisp.c (move_it_in_display_line_to): Fix calculation of height of a screen-line that is completely hscrolled out of view. Reported by Yasushi SHOJI <yasushi.shoji@gmail.com>.
* Avoid possibly unnecessary lisp_time_struct callPhilip Kaludercic2022-04-141-2/+1
| | | | | * timefns.c (time_cmp): Defer the calculation of the time struct, in case A and B are eq to one another.
* Fix races with child frame locks on HaikuPo Lu2022-04-141-13/+39
| | | | | | | * src/haiku_support.cc (CHILD_FRAME_LOCK_INSIDE_LOOPER_CALLBACK): New macro. (FrameMoved, WorkspacesChanged): Lock child frame data with that macro instead.
* Keep track of keyboard state during drag and dropPo Lu2022-04-141-7/+48
| | | | | | | | | | * src/xterm.c (x_dnd_cleanup_drag_and_drop): Deselect for keyboard state changes. (x_dnd_begin_drag_and_drop): Select for keyboard state changes when XKB is available. (x_dnd_update_state, handle_one_xevent): Use current XKB state if it is available. (x_term_init): Reformat code a little.
* Minor fixes to menus on XI2Po Lu2022-04-144-20/+64
| | | | | | | | | | | | | | * src/xfns.c (Fx_create_frame): Populate `xi_masks'. * src/xmenu.c (x_activate_menubar) (create_and_show_popup_menu, x_menu_show): Only clear input extension grabs if we (or the toolkit) actually selected for XI_ButtonPress events. * src/xterm.c (xi_frame_selected_for): New function. (xi_populate_device_from_info, handle_one_xevent): Store device use instead of just whether or not it's a master device. (x_dnd_begin_drag_and_drop): Clean up block_input stuff. * src/xterm.h: Update prototypes. (struct xi_device_t): Rename `master_p' to `use'.
* Ignore XdndPosition events triggered by the wrong mouse buttonPo Lu2022-04-141-0/+2
| | | | | * src/xterm.c (x_dnd_send_position): Don't send if button is set but not a scroll wheel button.
* Add support for Xdnd features introduced after version 5Po Lu2022-04-141-10/+83
| | | | | | * src/xterm.c (x_dnd_send_position, x_dnd_update_state) (handle_one_xevent): Add support for sending button and keyboard state during DND.
* ; * src/xterm.c (x_term_init): Fix whitespace.Eli Zaretskii2022-04-131-19/+19
|
* Move raw event selection on GTK+ 2 to a more appropriate placePo Lu2022-04-132-9/+25
| | | | | | | * src/xfns.c (setup_xi_event_mask): Stop selecting for RawKeyPress on the root window. * src/xterm.c (x_new_focus_frame): Select here instead, once a frame becomes focused.
* Fix input availability detection during visible-bellPo Lu2022-04-131-1/+13
| | | | | * src/xterm.c (XTflash): Exit pselect loop also if input becomes available on f's display connection.
* Minor cleanups to Haiku windowingPo Lu2022-04-133-69/+67
| | | | | | | | | * src/haikufns.c (haiku_create_frame, haiku_create_tip_frame): * src/haikuterm.h (struct haiku_output, struct scroll_bar) (XSCROLL_BAR): Remove used fields of various structs. * src/haikuterm.c (haiku_flash): Make input detection actually work.
* Fix zoom rect computation for some deskbar positions on HaikuPo Lu2022-04-131-6/+6
| | | | | * src/haiku_support.cc (CalculateZoomRect): Fix computation for left top and right bottom.
* Bump minimum GTK for PGTK buildsPo Lu2022-04-131-2/+0
| | | | | | | | | * configure.ac: Require GTK 3.20 or later if building with PGTK. It has already been required for some time now, but the requirement was not reflected in the configure script. * src/pgtkterm.c (pgtk_any_window_to_frame): Remove version check.
* Clean up PGTK code morePo Lu2022-04-132-184/+30
| | | | | | | | | | | | | | | | * src/pgtkterm.c (STORE_KEYSYM_FOR_DEBUG): Delete macro. (x_find_modifier_meanings): Delete function. (get_modifier_values, pgtk_gtk_to_emacs_modifiers) (pgtk_emacs_to_gtk_modifiers): Use GDK's own modifier mask constants instead of detecting our own from the keymap. This does mean a specific "meta" key will no longer be detected on X Windows, but that interface doesn't exist on Wayland, and X users should use the X port anyway. (key_press_event): Avoid decoding input text. (pgtk_term_init): Stop computing modifiers. (syms_of_pgtkterm): Delete obsolete comment. * src/pgtkterm.h (struct pgtk_display_info): Delete modifier masks.
* Remove unused flag on HaikuPo Lu2022-04-132-20/+12
| | | | | | * src/haikufns.c (haiku_create_frame, haiku_create_tip_frame): * src/haikuterm.h (struct haiku_output): Delete mentions of `explicit_parent'.
* Fix bit rot in the XEmbed codePo Lu2022-04-132-5/+15
| | | | | | | | * src/xterm.c (x_term_init): Delete unused atom. (handle_one_xevent): (x_make_frame_visible): Handle embedded frame visibility correctly. * src/xterm.h (struct x_display_info): Delete unused atom.
* Fix freezes when trying to accelerate menu bar on HaikuPo Lu2022-04-134-48/+70
| | | | | | | | | | | | | * src/haiku_support.cc (class EmacsWindow): New field `menus_begun'. (MenusBeginning): Don't send menu bar open events when that is set, instead set it to true. (BMenuBar_start_tracking): Stop locking the menu bar here and send a special BE_MENU_BAR_OPEN event instead. * src/haiku_support.h (struct haiku_menu_bar_state_event): Delete field `no_lock'. * src/haikumenu.c (Fhaiku_menu_bar_open): * src/haikuterm.c (haiku_read_socket): Update accordingly.
* Make the SVG error message less verboseLars Ingebrigtsen2022-04-131-1/+1
| | | | | | * src/image.c (svg_load_image): Don't include the spec in the error message, because this is commonly the entire SVG string, and this will fill up the *Messages* buffer quickly.
* Improve DISPOSE_PREVIOUS in gif_load slightlyLars Ingebrigtsen2022-04-121-0/+8
| | | | | * src/image.c (gif_load): Tweak how DISPOSE_PREVIOUS is handled. It's still not right, but it's less glaringly wrong.
* Fix 'window-text-pixel-size' when starting from a display propertyEli Zaretskii2022-04-121-2/+45
| | | | | | * src/xdisp.c (Fwindow_text_pixel_size): Handle the case where there's a display property at START and 'move_it_to' overshoots. (Bug#54862)
* Fix webp_load data lifetime issuesLars Ingebrigtsen2022-04-121-2/+14
| | | | | * src/image.c (webp_load): Take care of lifetime issues of the image data we're iterating over for animated images.
* Fix keyboard event device attribution on GTK+ 2Po Lu2022-04-123-1/+42
| | | | | | | | | * src/xfns.c (setup_xi_event_mask): Select for raw keypress events on GTK 2. * src/xterm.c (handle_one_xevent): Set pending keystroke time when a raw event is received. * src/xterm.h (struct x_display_info): New flag `pending_keystroke_time_special_p'.
* Fix detection of Meta key in some casesPo Lu2022-04-121-2/+5
| | | | | * src/xterm.c (x_find_modifier_meanings): Set found_meta_p correctly.
* Fix check for whether frames fit into gif imagesLars Ingebrigtsen2022-04-121-4/+7
| | | | * src/image.c (gif_load): Really check all frames that they fit.
* Fix some confusing names in xterm.cPo Lu2022-04-121-40/+40
| | | | | * src/xterm.c (enum xm_targets_table_byte_order): Rename to `xm_byte_order'. All uses changed.
* Store less data in the gif animation cacheLars Ingebrigtsen2022-04-121-6/+4
| | | | | * src/image.c (gif_load): Only start a cache if we're have an :index entry (which means that we're trying to animate something).
* Release resources in gif_load on errorsLars Ingebrigtsen2022-04-121-7/+10
| | | | | * src/image.c (webp_load): Clean up code slightly. (gif_load): Really release resources on GIF parsing errors.
* Animate GIF images that don't have an explicit delay settingLars Ingebrigtsen2022-04-121-5/+5
| | | | | * src/image.c (gif_load): Use the default delay for GIF images that don't explicitly state a delay.
* Fix thinko in the anim cacheLars Ingebrigtsen2022-04-121-8/+7
| | | | | | * src/image.c (gif_load): Fix resetting the cache when we're out of sync. (anim_create_cache): Start from zero, not 1.
* Disallow drag and drop inside a menu-entryPo Lu2022-04-121-5/+21
| | | | | | | | * src/xterm.c (x_dnd_cleanup_drag_and_drop): Always free DND targets even if waiting for finish. (x_dnd_begin_drag_and_drop): Free targets correctly when signalling error and prevent activating drag-and-drop inside a menu or popup. (It doesn't work.)
* Fix some DISPLAY variable related bugs on PGTKPo Lu2022-04-121-0/+18
| | | | | * src/callproc.c (getenv_internal, make_environment_block): Don't set DISPLAY on non-X GDK backends. (bug#54844)
* * src/xterm.c (frame_set_mouse_pixel_position): Avoid server grab.Po Lu2022-04-121-3/+4
|
* Don't use native image APIs for some types on HaikuPo Lu2022-04-121-0/+6
| | | | | | * src/haikuimage.c (haiku_can_use_native_image_api): Ignore types with animations when their respective libraries are present.
* Fix last tool bar bug on Haiku as wellPo Lu2022-04-121-1/+3
| | | | | * src/haikuterm.c (haiku_read_socket): Adapt last change to Haiku.
* Fix selecting text and releasing the mouse buttons above the toolbarPo Lu2022-04-121-2/+13
| | | | | * src/xterm.c (handle_one_xevent): Don't send ButtonRelease events to tool bars if there is no selected tool bar item.
* Make normal image caching actually work when doing animated imagesLars Ingebrigtsen2022-04-111-2/+44
| | | | | | | * src/image.c (filter_image_spec): New function. (uncache_image): Use it. (lookup_image): Ditto. (syms_of_image): Define some keywords.
* ; * src/image.c: move #endif to correct placeMattias EngdegÄrd2022-04-111-4/+2
|
* Make gif_load work across architectures againLars Ingebrigtsen2022-04-111-23/+39
| | | | | | | * src/image.c (gif_load): Invert the way animated pixmaps are created: Work on the cached computed-so-far pixmap, and then copy the entire thing to the ximg with PUT_PIXEL at the end. This should work across platforms, which the previous version didn't.
* Revert "; * src/image.c (gif_load): Fix compilation error on MS-Windows."Lars Ingebrigtsen2022-04-111-4/+0
| | | | | | This reverts commit a715f2fbe70bb4cbb961e82af95e2965030b4513. This is fixed in a different way in a subsequent commit.
* ; * src/image.c (gif_load): Fix compilation error on MS-Windows.Eli Zaretskii2022-04-111-0/+4
|
* Fix anim_cache garbage collectionLars Ingebrigtsen2022-04-111-85/+89
| | | | | * src/image.c (struct anim_cache): Move earlier. (mark_image_cache): Mark the Lisp_Object in the anim cache.
* Fix compilation errors when HAVE_GIF and not HAVE_WEBPLars Ingebrigtsen2022-04-111-1/+1
| | | | * src/image.c: Enable the cache functions when HAVE_GIF, too