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

45006 commits

Author SHA1 Message Date
Po Lu
a7dbbcac57 Fix display of internal border in child frames on pgtk
* src/pgtkfns.c (Fx_create_frame): Fix child frame border
resource names.
* src/pgtkterm.c (pgtk_clear_under_internal_border): Fix test
for child frames.  (bug#53018)
2022-01-05 10:16:56 +08:00
Po Lu
6719a3ccab Correctly set up XI key input mask on X Toolkit builds
* src/xfns.c (setup_xi_event_mask): Also set the key event mask
on the outer window, which might also have the input focus.
(x_window) [USE_X_TOOLKIT]: Set up XI event mask a bit later.
2022-01-05 09:39:57 +08:00
Eli Zaretskii
38b4bbb7e1 A cleaner fix for display bug#52947
* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Don't call
set_iterator_to_next here...
(display_tab_bar_line): ...call it here, even if we exit the loop
because we encounter a newline.
2022-01-04 15:37:16 +02:00
Po Lu
c36741f9c5 Translate more modifiers to GDK ones in xwidgets
* src/xwidget.c (xw_translate_x_modifiers): Also handle Control
and ShiftMask.
2022-01-04 19:56:58 +08:00
Po Lu
377bf26ebe Stop assuming X kbd state works with GDK when forwarding events to xwidgets
* src/xwidget.c (xw_translate_x_modifiers): New function.
(Fxwidget_perform_lispy_event): Translate X modifiers to GDK
modifiers before sending them to the xwidget.
2022-01-04 19:30:07 +08:00
Alan Third
2d4b2e296b Remove macOS drop-shadows on some frames (bug#28512)
* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Remove
shadows on undecorated child frames.
2022-01-04 10:55:12 +00:00
Po Lu
9651be5b48 Fix unused variable warning in last change
* src/haiku_draw_support.c (BBitmap_transform_bitmap): Fix
unused variable warning.
2022-01-04 08:14:40 +00:00
Po Lu
a851e5a669 Rationalize Haiku rectangle handling
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(rotate_bitmap_270):
(rotate_bitmap_90):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (UnZoom):
(GetParentWidthHeight):
(MakeFullscreen):
(AttachCairoSurface):
(AfterResize):
(DrawContent):
(BView_cr_dump_clipping): Use new rectangle handling macros.

* src/haiku_support.h (BE_RECT_WIDTH, BE_RECT_HEIGHT): New
macros.
2022-01-04 08:07:53 +00:00
Po Lu
cbbe235a90 Make menu bar key navigation work on Haiku
* src/haiku_support.cc (menu_bar_active_p): New variable.
(DispatchMessage): Pass through key events if the menu bar is
active.
(MenusBeginning, MenusEnd): Set `menu_bar_active_p' according
to the state of the menu bar.
(BMenuBar_delete): Clear `menu_bar_active_p'.

* src/haikufns.c (haiku_free_frame_resources): Block input only
after checking that F is a window system frame.
* src/haikumenu.c (Fhaiku_menu_bar_open): Update doc string.
2022-01-04 06:48:08 +00:00
Po Lu
693815e90f Improve Haiku frame restacking logic
* src/haiku_support.cc (BWindow_is_active):
* src/haiku_support.h (BWindow_is_active): New functions.

* src/haikufns.c (Fhaiku_frame_restack): Prevent the newly
raised frame from being sent to the back of the display.
2022-01-04 06:10:25 +00:00
Po Lu
f3481f21f7 Find a way to make restacking frames work on Haiku
* doc/lispref/frames.texi (Raising and Lowering): Update
documentation to reflect that restacking frames is now
supported on Haiku.
* lisp/frame.el (haiku-frame-restack): New declaration.
(frame-restack): Use `haiku-frame-restack' on Haiku.

* src/haiku_support.cc (BWindow_send_behind):
* src/haiku_support.h (BWindow_send_behind):
* src/haikufns.c (Fhaiku_frame_restack): New functions.
(syms_of_haikufns): New subr `haiku-frame-restack'.
2022-01-04 05:22:56 +00:00
Po Lu
6668a7608c Add effective group to xkey events when handling XI key press events
* src/xterm.c (handle_one_xevent): Add effective group to
xkey.state when translating XI key events.
2022-01-04 11:17:59 +08:00
Po Lu
cd7e7834ba Fix Haiku bitmap sanity checks
* src/haikufns.c (haiku_get_pixel, haiku_put_pixel): Fix sanity
checking of coordinate values.
2022-01-04 02:21:23 +00:00
Po Lu
a89bc0fe9c Fix fringe bitmap display on haiku again
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
off-by-one errors.
2022-01-04 02:01:30 +00:00
Po Lu
7eb86a1788 Fix duplicate file panel display on Haiku
* lisp/term/haiku-win.el (x-file-dialog): Fix up prompt to look
better.

* src/haiku_support.cc (be_popup_file_dialog): Remove duplicate
call to `Show'.
2022-01-04 01:30:27 +00:00
Stefan Monnier
460f35e96d Revert part of 59732a83c8 to fix bug#52969
While we don't need to put docstrings of .elc files into etc/DOC,
we still need to put those of `loaddefs.el` there since we don't have
a "dynamic docstring" feature for the non-compiled files and keeping
the actual docstrings in the heap would be prohibitive.

* src/Makefile.in ($(etc)/DOC): Scan `lisp/loaddefs.el` still.

* lib-src/make-docfile.c (scan_lisp_file): New function.
(scan_file): Use it.
(skip_white, read_lisp_symbol, search_lisp_doc_at_eol): New functions.
2022-01-03 15:04:12 -05:00
Po Lu
ab5ee3e29e * src/haiku_font_support.cc (BFont_char_bounds): Fix bearings. 2022-01-03 13:57:13 +00:00
Po Lu
c7768382cc Synchronize at a better place when making a frame visible on Haiku
* src/haiku_support.cc (BWindow_set_visible): Stop synchronizing
here.

* src/haikufns.c (haiku_visualize_frame):
(haiku_unvisualize_frame): Sychronize after visibility changes.
2022-01-03 11:07:29 +00:00
Po Lu
f6501fded7 Don't try to guess a delta if a scroll valuator's state is unknown
* src/xterm.c (x_get_scroll_valuator_delta): Return DBL_MAX if
the scroll valuator's value is unknown.
2022-01-03 11:21:16 +08:00
Po Lu
01047cf13f Revert "Stop sending touch-end events if coalescing scroll events"
This reverts commit a6952f78f3.
2022-01-03 11:17:43 +08:00
Po Lu
7544ede1bc Use XKB to find modifiers on x
* src/xterm.c (x_find_modifier_meanings): Look for virtual
modifiers with Xkb instead.
(handle_one_xevent): Add group when translating XI2 keycodes and
handle Xkb keymap events.
(x_term_init): Populate dpyinfo->xkb_event_type.

* src/xterm.h (struct x_display_info): New field
`xkb_event_type', and change modifier masks to `unsigned int'.
2022-01-03 10:56:45 +08:00
Po Lu
a4cb14b536 * src/haikumenu.c (haiku_menu_show): Fix input blocking. 2022-01-03 00:59:58 +00:00
Stefan Monnier
04c0245d36 Merge remote-tracking branch 'origin/emacs-28' into trunk 2022-01-02 17:07:42 -05:00
Eli Zaretskii
6e53178a37 Avoid inflooping when 'tab-bar-format' includes embedded newlines
* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Support
'tab-bar-format' with embedded newlines.  (Bug#52947)
2022-01-02 21:36:13 +02:00
Po Lu
be6b9e4580 Add column width to tooltip frame width on pgtk
* src/pgtkfns.c (Fx_show_tip): Add column width to width to
avoid an odd problem in the GTK allocation code.  (bug#52705)
2022-01-02 20:28:58 +08:00
Eli Zaretskii
b477cff35d Clarify %g and %G time format specs
* src/timefns.c (Fformat_time_string):
* doc/lispref/os.texi (Time Parsing): Clarify %g/%G.  (Bug#52934)
2022-01-02 09:30:15 +02:00
Po Lu
01615b24da Fix mouse wheel scroll direction on pgtk
* src/pgtkterm.c (scroll_event): Fix scroll modifiers when
`mwheel-coalesce-scroll-events' is nil.
2022-01-02 15:14:16 +08:00
Po Lu
a6952f78f3 Stop sending touch-end events if coalescing scroll events
* src/xterm.c (handle_one_xevent): Don't generate touch-end
events if mwheel_coalesce_scroll_events is non-nil.
2022-01-02 11:02:02 +08:00
Po Lu
5bdf413b19 Fix mouse face problems when moving between two frames on Haiku
* src/haiku_support.cc (movement_locker): New locker.
(MouseMoved): Lock that locker.
(BWindow_new):
(BWindow_quit): Use LockLooper instead of Lock.

* src/haikuterm.c (haiku_read_socket): Clear mouse face if
a motion event is received for a frame other than the one
that is currently displaying the mouse face.
2022-01-02 02:37:21 +00:00
Po Lu
af729b1dfd Make quitting actually work in Haiku file dialogs
* src/haiku_support.h: (be_popup_file_dialog)
* src/haiku_support.cc (be_popup_file_dialog): New parameter
`maybe_quit_function'.
* src/haikufns.c (Fhaiku_read_file_name): Pass `maybe_quit' as
the maybe_quit_function.
2022-01-02 00:43:54 +00:00
Eli Zaretskii
823b6b8d26 ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Po Lu
748e670d5d Make last change compile
* src/haiku_support.cc (EmacsShow): Fix last change.
(TearDownDoubleBuffering): Likewise.
(Draw): Draw normally if not double buffered even if shown_flag
is true.
2022-01-01 10:29:44 +00:00
Po Lu
141a06334e Fix expose events in non-double-buffered child frames on Haiku
* src/haiku_support.cc (EmacsShow): Set shown_flag to 1 only if
this view is double buffered.
(TearDownDoubleBuffering): Clear shown_flag.
2022-01-01 10:24:38 +00:00
Zhehao Lin
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
Copyright-paperwork-exempt: yes
2022-01-01 11:57:42 +02:00
Po Lu
ab3c6c799e Fix some more off-by-one errors in Haiku image code
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp):
(BView_DrawMask):
(BBitmap_transform_bitmap):
* src/haiku_support.cc (AttachCairoSurface): Adjust calculations
to take account of BRect width and height functions returning
(start - end) instead of the actual width and height of the
rectangle.
2022-01-01 09:56:14 +00:00
Po Lu
c6d83707d6 Fix deadlocks with invisible frames and threads in Haiku
* src/haiku_support.cc (class EmacsWindow): New field
`was_shown_p'.
(EmacsShow): Lock looper if the window wasn't ever visible.
(BWindow_new): Unlock window looper after creating it.
2022-01-01 09:33:15 +00:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Po Lu
a27511ff2f Set display last user time when handling pinch events
* src/xterm.c (handle_one_xevent): Set last user time for XI
pinch events.
2022-01-01 15:23:55 +08:00
Po Lu
cbc77dcf03 Fix child frame synchronization order on Haiku
* src/haiku_support.cc (DoMove):
(FrameMoved): Fix locking and sync order semantics.
2022-01-01 07:10:39 +00:00
Po Lu
376d6cf36a Implement numeric values of `mouse-highlight' on Haiku
* src/haikuterm.c (haiku_read_socket): Clear mouse face on
keyboard input if `mouse-highlight' is a fixnum.
2022-01-01 06:17:51 +00:00
Stefan Kangas
78066671c0 Merge from origin/emacs-28
67400da412 Improve doc strings of fringe indicator variables
a6adfe21e4 * lisp/tab-line.el (tab-line--get-tab-property): New funct...
2022-01-01 06:51:58 +01:00
Po Lu
57753ed761 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-01-01 05:36:23 +00:00
Po Lu
d7e1ed17d9 Flush frames after mouse face is cleared on a child frame in Haiku
* src/haiku_support.cc (~EmacsWindow):
(UpwardsSubsetChildren):
(UpwardsUnSubsetChildren): Fix locking semantics.

* src/haikuterm.c (haiku_read_socket): Flush dirty back buffers
after clearing mouse face because the pointer was moved out of a
frame.
2022-01-01 05:32:42 +00:00
Po Lu
4d1968b4c9 Print dead xwidgets specially
* src/print.c (print_vectorlike) <PVEC_XWIDGET>: Print "killed
xwidget" for dead xwidgets.
2022-01-01 08:54:51 +08:00
Eli Zaretskii
67400da412 Improve doc strings of fringe indicator variables
* src/buffer.c (syms_of_buffer): Fix doc strings of
'indicate-empty-lines' and 'indicate-buffer-boundaries'.
2021-12-31 21:58:42 +02:00
Po Lu
1f34f072be Fix copyright dates in some files belonging to the pgtk port
* src/pgtkgui.h:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkselect.h:
* src/pgtkterm.c:
* src/pgtkterm.h: Fix copyright dates to say '2021'.
2021-12-31 21:08:23 +08:00
Po Lu
7dd4dc6ace On Haiku, sync a frames's connection to the app sever after raising
* src/haiku_support.h: (BWindow_sync)
* src/haiku_support.cc (BWindow_sync): New function.
* src/haikuterm.c (haiku_frame_raise_lower): Synchronize window
after raising it to avoid situations where raising windows is
done out-of-order, such as when ediff raises a frame.
2021-12-31 13:03:07 +00:00
Po Lu
a8c3e8e2a6 Fix child frame unlinking on Haiku
* src/haiku_support.cc (UnlinkChild): Fix obvious mistake.
(DoMove): Lock child frame window before moving it.
2021-12-31 10:59:53 +00:00
Po Lu
d1fde0ab8a Use a single global lock for the child frame state on Haiku
Each BWindows (and various system callbacks) runs in a separate
thread, so there are very complicated locking semantics that
used to be handled manually.  This changes child frame state to
use a single global lock, which makes things much easier.

* src/haiku_support.cc (child_frame_lock): New variable.
(class EmacsWindow):
(~EmacsWindow):
(Unparent):
(ParentTo):
(MoveChild):
(FrameMoved):
(EmacsHide):
(EmacsShow):
(GetParentWidthHeight):
(OffsetChildRect):
(MakeFullscreen):
(SetUpDoubleBuffering): Use a single lock for controlling access
to child frame state.
2021-12-31 09:31:27 +00:00