1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

45124 commits

Author SHA1 Message Date
Eli Zaretskii
8cc1b9035c Revert "Add undelete-frame-max instead of undelete-frame-mode (bug#51883)"
This reverts commit 714e11d535.

That commit was unilateral and disregarded past discussions.
2022-01-17 14:51:53 +02:00
Po Lu
412247c53f Fix Emacs icon not appearing on Haiku
* 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-17 11:09:50 +00:00
Po Lu
1cd6737a38 Use BControlLook to determine scroll bar size on Haiku
* src/haiku_support.cc (BScrollBar_default_size): Use
BControlLook instead of legacy constants.
2022-01-17 10:46:55 +00:00
Po Lu
2fa1eced39 Display override redirect frames in all workspaces on Haiku
* 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 10:08:04 +00:00
Po Lu
c2f3a2f5e3 * src/haikufns.c (Fx_show_tip): Sync after making window visible. 2022-01-17 05:06:31 +00:00
Po Lu
ace6a88285 Really eliminate tooltip flicker on Haiku
* 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-17 04:53:42 +00:00
Po Lu
84ebb16577 Translate timestamps when using GTK native input
* src/gtkutil.c (xg_widget_key_press_event_cb): Use timestamp
specified in key event.
(xg_filter_key): Translate timestamps.
2022-01-17 09:48:01 +08:00
Po Lu
e25db1e167 Exercise wire right after event is filtered for native input
* src/xterm.c (handle_one_xevent): Run a no-op immediately after
an event was filtered by GDK.
2022-01-17 08:30:38 +08:00
Juri Linkov
714e11d535 Add undelete-frame-max instead of undelete-frame-mode (bug#51883)
* 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-16 22:58:30 +02:00
Po Lu
8f65246523 Fix XI2 event filtering for very old versions of libXi
* src/xterm.c (handle_one_xevent): Handle cases where
xev->display is NULL.
2022-01-16 21:40:07 +08:00
Po Lu
1220cf605b Fix the xft build
* src/xsettings.h [!HAVE_PGTK]: Include dispextern.h and remove
duplicate definition of Display_Info.
2022-01-16 19:45:54 +08:00
Po Lu
5476026119 Use kMenuWindowFeel on Haiku toolkip windows
* 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-16 11:02:58 +00:00
Po Lu
7f074fecf4 Make help event generation on Haiku behave closer to X
* src/haikuterm.c (haiku_read_socket): Generate help events more
like how X does it.
2022-01-16 10:43:22 +00:00
Po Lu
df53beb2db Reduce poll time for Haiku file dialogs
* 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 10:12:22 +00:00
Po Lu
0ae6491a89 * src/gtkutil.c (xg_widget_key_press_event_cb): Also raise input signal. 2022-01-16 18:02:04 +08:00
Yuuki Harano
da35e9d5ef * src/pgtkterm.c (evq_flush): Shift events one by one 2022-01-16 17:25:28 +09:00
Po Lu
9b308a333b Avoid focus and allow monospace text in tooltip frames on Haiku
* 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-16 05:59:39 +00:00
Po Lu
e2b9f3347e Update modifier meanings even if an xkb_desc was not available
* src/xterm.c (handle_one_event): Always update modifiers after
the keyboard mapping is refreshed.
2022-01-16 13:46:39 +08:00
Po Lu
c59e870cce * src/xwidget.c (webkit_js_to_lisp): Use correct constant to check size. 2022-01-16 10:05:17 +08:00
Po Lu
80c52346c2 Fix a minor snafu when resizing frames on Haiku
* 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.
2022-01-16 00:47:41 +00:00
Eli Zaretskii
de3a957265 Fix setting cursor in pixel-scrolling modes
* src/xdisp.c (redisplay_window): Don't set cursor to any glyph
row past the one that contains EOB.  (Bug#53275)
2022-01-15 15:58:21 +02:00
Po Lu
ae65f2089c Use preferred XIM style without trying to detect if it's supported
The old code would in general fall back to the default if the
preferred style wasn't available, which is usually worse than
what the user specified

* src/xfns.c (best_xim_style): Stop checking if the preferred
input style is supported.
2022-01-15 20:17:22 +08:00
Po Lu
3b27edd5f5 * src/emacsgtkfixed.c (XSetWMSizeHints): Remove some useless code. 2022-01-15 18:11:35 +08:00
Stefan Kangas
8df828e405 Merge from origin/emacs-28
5990148860 * lisp/simple.el (undo-no-redo): Fix customization group
ac2cdb8a46 * lisp/progmodes/xref.el (xref-file-name-display): Fix doc...
c05864dd25 Avoid another segfault in 'face_at_buffer_position'
2022-01-15 06:47:59 +01:00
Po Lu
43618cd44c Find a way to make lowering frames work on Haiku
* doc/lispref/frames.texi (Raising and Lowering): Document that
lowering frames is now supported on Haiku.
* src/haikuterm.c (haiku_frame_raise_lower): Implement a hack to
lower frames.
2022-01-15 05:30:28 +00:00
Po Lu
9d809ed9bb Filter key release events when using native input without having XIM
* src/xterm.c (handle_one_xevent): Also check for XI key
release events when using native input on a build without XIM.
2022-01-15 13:25:23 +08:00
Po Lu
9845f6b9aa Fix native input when using core input events
* src/gtkutil.c (xg_filter_key): Test for core key press events
correctly.
* src/xterm.c (handle_one_xevent): Also check for KeyRelease
events.
2022-01-15 09:40:28 +08:00
Po Lu
1f5f3b7e89 Remove non-functional configure test
It cannot work anymore, leading to compiler warnings when
building xterm.c.

* configure.ac: Remove test for whether
XRegisterIMInstantiateCallback wants XPointer or XPointer * as
the client_data.

* src/xterm.c (xim_initialize):
(xim_close_dpy): Just cast client data to void * and hope that
the compiler keeps quiet.
2022-01-15 09:11:11 +08:00
Eli Zaretskii
c05864dd25 Avoid another segfault in 'face_at_buffer_position'
* src/xfaces.c (face_at_buffer_position): Make really sure the
default face is usable.  (Bug#53254)
2022-01-14 16:11:34 +02:00
Po Lu
30dbdecd4a * src/xterm.c: Add a small writeup on input handling on X.
Hopefully I will extend this section with details about more
aspects of X11 support in the future.
2022-01-14 19:50:40 +08:00
Po Lu
e0268fd7d5 Fix leak when refs are sent to a frame during destruction on Haiku
* src/haikuterm.c (haiku_read_socket): Free b->ref if it was
sent from a frame that was destroyed.
2022-01-14 09:46:50 +00:00
Po Lu
a970a2a489 Make sure the X mouse position hook always looks at an X frame
* src/xterm.c (XTmouse_position): Check that f1 is an X frame.
2022-01-14 17:43:09 +08:00
Sergey Vinokurov
a5ce31a192 Use assq_no_quit on all local_var_alist accesses
* src/data.c (Fkill_local_variable):
* src/buffer.c (buffer_local_value): Use assq_no_quit instead of
Fassoc/Fassq on local_var_alist (bug#53242).

* src/data.c (Flocal_variable_p): Use assq_no_quit instead of
open-coding the search on local_var_alist.
2022-01-14 08:50:06 +01:00
Po Lu
1158c880e2 Try to make sure an XKB desc is always available
* src/xterm.c (handle_one_xevent): Re-retrieve XKB map if it's
unavailable for some reason upon handling an XKB map or keyboard
notify event.
2022-01-14 14:57:55 +08:00
Po Lu
4e1bf9bf48 Fix out of bounds bitmap access on Haiku
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
out of bounds access to bitmap data.
2022-01-14 01:24:34 +00:00
Po Lu
83ae392d59 Refresh keyboard mapping upon receiving new XKB map
* src/xterm.c (handle_one_xevent): Call
XkbRefreshKeyboardMapping where required.
2022-01-14 08:52:53 +08:00
Eli Zaretskii
1ee9275c1b Avoid scrolling display when point moves into invisible text
* src/xdisp.c (try_cursor_movement): Handle point moving into
invisible text.  (Bug#53215)
2022-01-13 15:40:30 +02:00
Eli Zaretskii
8ec475e558 Improve preserving X coordinate during scroll commands
* src/window.c (window_scroll_pixel_based): Don't unnecessarily
move the iterator.  (Bug#53220)
2022-01-13 14:21:10 +02:00
Po Lu
8c8403af36 Fix passive input focus when the pointer moves over inferiors
* src/xterm.c (handle_one_xevent): Don't detect focus on entry
and exit events if we're not on the top window.
2022-01-13 19:43:55 +08:00
Po Lu
626c1dce02 Filter key release events through GTK when using native input
* src/gtkutil.c (xg_filter_key): Set correct event type for key
release events.
* src/xterm.c (x_filter_event): Also filter release events.
2022-01-13 17:56:55 +08:00
Gregory Heytings
48159c16b5 Undelete deleted frames.
* lisp/frame.el (undelete-frame): New command.
(undelete-frame--handle-delete-frame): New auxiliary function.
(undelete-frame--deleted-frames): New auxiliary variables.
(undelete-frame-mode): New minor mode.
(ctl-x-5-map): Bind the new command.

* etc/NEWS: Document the new command and minor mode.

* src/frame.c (Fdelete_frame): Update docstring, and mention the
minor mode.

* lisp/menu-bar.el (menu-bar-file-menu): Add an entry for the
new command.

* doc/emacs/frames.tex (Frame Commands): Document the new command
and minor mode.

See bug#51883.
2022-01-13 10:31:43 +02:00
Po Lu
46f24bf08f Fix GTK native input methods randomly freezing input
* src/gtkutil.c (xg_widget_key_press_event_cb): Exercise the X11
connection causing pselect to return immediately from input.
(bug#53160)
2022-01-13 10:12:39 +08:00
Po Lu
931b6ac973 Block input when drawing fringe bitmaps on Haiku
* src/haikuterm.c (haiku_draw_fringe_bitmap): Block input.
2022-01-13 01:59:23 +00:00
Po Lu
8ba316736f Use XI2 focus events on X toolkit builds
* src/xfns.c (setup_xi_event_mask): Set focus masks on both the
shell window and the frame window.
* src/xterm.c (x_detect_focus_change): Enable XI2 focus code on
Xt.
2022-01-13 09:32:14 +08:00
Eli Zaretskii
7ebcb4b6f2 Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption.  Reported
by Sean Whitton <spwhitton@spwhitton.name>.  This is for builds
with Fontconfig < v2.11.91, for which the fix in
'ftfont_pattern_entity' cannot work.  (Bug#52888)
2022-01-12 16:52:14 +02:00
Sean Whitton
f373b52ba9 Skip virtual FcPattern entries for variable weight fonts
* src/ftfont.c (ftfont_list): Pass FC_VARIABLE to FcObjectSetBuild.
* src/ftfont.c (ftfont_pattern_entity): Skip meta/virtual FcPattern
entries for variable weight fonts (Bug#52888).
2022-01-12 16:42:27 +02:00
Po Lu
492bf1e06e Use correct coordinates when translating XI2 crossing events
* src/xwidget.c (xwidget_motion_or_crossing): Use displaced
position instead of event position.
2022-01-12 20:13:28 +08:00
Po Lu
aa685a465b Ignore scroll lock key on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Return special
value for keys that shouldn't be sent to Emacs.
(DispatchMessage): Respect said value.
2022-01-12 11:09:38 +00:00
Po Lu
60dd962507 Translate more keys on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Translate print,
scroll lock, and pause/break.
2022-01-12 07:21:28 +00:00
Po Lu
9376f456af Fix display of text decorations in the mode line
This is considered a temporary fix until the cause of
fringe-overwriting underlines is established.

* src/xterm.c (x_draw_glyph_string): Don't constrain decorations
if the row is a tab or modeline.
2022-01-12 11:09:52 +08:00