<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chemacs.git/src/w32term.c, branch devmain</title>
<subtitle>emacs
</subtitle>
<id>http://cgit.adnoto.dev/chemacs.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chemacs.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/'/>
<updated>2026-05-27T04:57:20Z</updated>
<entry>
<title>ARRAYELTS → countof</title>
<updated>2026-05-27T04:57:20Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-27T00:51:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=225876e97999664a075eb6f1489b4b4c8e515ded'/>
<id>urn:sha1:225876e97999664a075eb6f1489b4b4c8e515ded</id>
<content type='text'>
C2y will standardize countof as the macro that Emacs uses the name
ARRAYELTS for.  Switch to the standard name, which is supported
by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already
in use for compilers that do not support countof.
Also, use countof in a few places where we missed using ARRAYELTS.
* admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS.
* admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h,
as it is now a direct rather than an indirect dependency.
* exec/trace.c, src/lisp.h, src/sfnt.c: Include &lt;stdcountof.h&gt;.
(ARRAYELTS): Remove.  All uses replaced by countof.
* lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c:
* lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c:
Prefer &lt;stdcountof.h&gt; and countof to doing things by hand.
</content>
</entry>
<entry>
<title>New function memory_full_up</title>
<updated>2026-05-24T02:18:52Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2026-05-20T01:39:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=1eb2e052bb55184d62c1dec265f6d327be4e9113'/>
<id>urn:sha1:1eb2e052bb55184d62c1dec265f6d327be4e9113</id>
<content type='text'>
* src/alloc.c (memory_full_up): New function.  Replace all callers
of memory_full (SIZE_MAX) with callers to this function.
This simplifies callers and should make future changes easier.
It also saves a whopping 296 bytes in executable size
with gcc 16.1.1 20260515 (Red Hat 16.1.1-2) x86-64.
</content>
</entry>
<entry>
<title>Always compile w32image.c on MinGW (Bug#80924)</title>
<updated>2026-04-30T15:52:22Z</updated>
<author>
<name>Randy Taylor</name>
<email>dev@rjt.dev</email>
</author>
<published>2026-04-30T02:18:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=edc19c35369670e1dcf8afdd00c54bc68fc5594b'/>
<id>urn:sha1:edc19c35369670e1dcf8afdd00c54bc68fc5594b</id>
<content type='text'>
This enables features unrelated to native image APIs, such as
'w32-export-frame' and 'yank-media', which need to call GDI+
functions.
* configure.ac (HAVE_W32) [!CYGWIN]: Always include w32image.o in
W32_OBJ.
* etc/NEWS: Drop 'yank-media' '--without-native-image-api' caveat.
* src/emacs.c (main):
* src/w32select.c (convert_dibv5_to_png):
* src/w32term.c (w32_draw_image_foreground): Replace
HAVE_NATIVE_IMAGE_API with WINDOWSNT.
* src/w32.c (term_ntproc): Remove redundant HAVE_NATIVE_IMAGE_API guard.
* src/w32fns.c (Fw32_export_frame) [!WINDOWSNT]: Return nil on Cygwin.
</content>
</entry>
<entry>
<title>system-sleep sleep blocker and sleep/wake event package (bug#80348)</title>
<updated>2026-02-11T08:52:38Z</updated>
<author>
<name>Stéphane Marks</name>
<email>shipmints@gmail.com</email>
</author>
<published>2026-02-04T23:20:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=0bee754a7204f911f934d750f6f1870c929ccdb0'/>
<id>urn:sha1:0bee754a7204f911f934d750f6f1870c929ccdb0</id>
<content type='text'>
This package provides platform-neutral interfaces to block your
system from entering idle sleep and a hook to process pre-sleep
and post-wake events.

Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and
MS-Windows.

* lisp/system-sleep.el: New package.
* src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM.
* src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep)
(syms_of_nsfns): New functions.
* src/nsterm.m (applicationDidFinishLaunching): Subscribe to
pre-sleep and post-wake notifications.
(systemWillSleep, systemDidWake): New function.
* src/w32fns.c (Fw32_block_system_sleep)
(Fw32_unblock_system_sleep, Fw32_system_sleep_block_count)
(sleep_notification_callback)
(w32_register_for_sleep_notifications): New function.
(syms_of_w32fns): Sw32_unblock_system_sleep
Sw32_block_system_sleep Sw32_system_sleep_block_count: New
defsubr.
* src/w32term.h (Fw32_block_system_sleep): New extern.
* src/w32term.c (w32_initialize): Call
w32_register_for_sleep_notifications.
* doc/lispref/os.texi: Document the system-sleep package.
* doc/lispref/commands.texi: Update sleep-event special
documentation.
* etc/NEWS: Announce the new package.
</content>
</entry>
<entry>
<title>; Add 2026 to copyright years.</title>
<updated>2026-01-01T12:54:34Z</updated>
<author>
<name>Sean Whitton</name>
<email>spwhitton@spwhitton.name</email>
</author>
<published>2026-01-01T12:54:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=c31f6adc31d48076c63ad82b83b2970e1b0d7b9b'/>
<id>urn:sha1:c31f6adc31d48076c63ad82b83b2970e1b0d7b9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add functions to set frame size and position in one compound step</title>
<updated>2025-12-22T10:01:53Z</updated>
<author>
<name>Martin Rudalics</name>
<email>rudalics@gmx.at</email>
</author>
<published>2025-12-22T10:01:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=f3d9371a890699fe4047f693adfcd4d8dbe2fb7d'/>
<id>urn:sha1:f3d9371a890699fe4047f693adfcd4d8dbe2fb7d</id>
<content type='text'>
* lisp/frame.el (set-frame-size-and-position): New function.
* src/frame.c (adjust_frame_size): Handle requests to set size
and position.
(Fset_frame_size_and_position_pixelwise): New function.
* src/gtkutil.c (xg_frame_set_size_and_position): New function.
(xg_wm_set_size_hint): Handle any non-NorthWestGravity values
for child frames only.  Some GTK implementations don't like
them.
* src/gtkutil.h (xg_frame_set_size_and_position.): Add external
declaration.
* src/termhooks.h (set_window_size_and_position_hook): New hook.
* src/w32term.c (w32_set_window_size_and_position): New
function.
(w32_create_terminal): Make it the Microsoft Windows API
set_window_size_and_position_hook.
* src/xterm.c (x_set_window_size_and_position_1)
(x_set_window_size_and_position): New functions.
(x_create_terminal): Make x_set_window_size_and_position the
set_window_size_and_position_hook for the X protocol.
* src/xterm.h (x_set_window_size_and_position): Add external
declaration.
* etc/NEWS: Announce new functions.
</content>
</entry>
<entry>
<title>Support `toolkit-theme-set-functions' on Android and execute hooks safely</title>
<updated>2025-11-24T02:16:49Z</updated>
<author>
<name>Po Lu</name>
<email>luangruo@yahoo.com</email>
</author>
<published>2025-11-24T02:16:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=7550791287503ebc582c92841f6483032aa0b050'/>
<id>urn:sha1:7550791287503ebc582c92841f6483032aa0b050</id>
<content type='text'>
* java/org/gnu/emacs/EmacsNative.java (setEmacsParams): New arg
UIMODE.
(sendConfigurationChanged): New args DETAIL and UI_MODE.

* java/org/gnu/emacs/EmacsNoninteractive.java (main1): Provide
an undefined UI mode.

* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
uiMode.
(onCreate): Initialize this field at start-up and provide the
same to setEmacsParams.
(onConfigurationChanged): If the UI mode has been altered,
generate a configuration changed event to match.

* src/android.c (android_ui_mode): New variable.
(setEmacsParams): New argument UI_MODE.  Initialize the same
from this variable.

* src/androidgui.h (enum android_configuration_changed): New
enum.
(struct android_configuration_changed_event): New field
`DETAIL'.  Convert fields providing specifics into a union of
display density information and a UI mode integer.

* src/androidterm.c (handle_one_android_event): Handle both
manners of configuration change events.
(android_term_init): Initialize Vtoolkit_theme from UI mode
provided at start-up.

* src/frame.c (syms_of_frame): Always define Vtoolkit_theme.
Define Qtoolkit_theme_set_functions.

* src/gtkutil.c (xg_update_dark_mode_for_all_displays):

* src/w32term.c (w32_read_socket): Generate special toolkit
theme events, rather than executing hooks directly within the
read_socket callback.

* src/keyboard.c (kbd_buffer_get_event)
&lt;TOOLKIT_THEME_CHANGED_EVENT&gt;: Run Qtoolkit_theme_set_functions
and set Vtoolkit_theme from event-&gt;ie.arg.

* src/termhooks.h (enum event_kind): New event
TOOLKIT_THEME_CHANGED_EVENT.
</content>
</entry>
<entry>
<title>Add `toolkit-theme' and 'toolkit-theme-set-functions'</title>
<updated>2025-11-22T10:57:53Z</updated>
<author>
<name>Ahmed Khanzada</name>
<email>me@enzu.ru</email>
</author>
<published>2025-11-17T04:08:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=bc0f662573684919af7440b41531e9861a86ce6f'/>
<id>urn:sha1:bc0f662573684919af7440b41531e9861a86ce6f</id>
<content type='text'>
* etc/NEWS: Document `toolkit-theme' and
'toolkit-theme-set-functions'
* lisp/frame.el: Add 'toolkit-theme-set-functions'
* src/frame.c: Add `toolkit-theme' Elisp variable
* src/gtkutil.c: (xg_update_dark_mode_for_all_displays): Set
`toolkit-theme' and call 'toolkit-theme-set-functions'
* src/w32fns.c: (w32_applytheme): Send WM_EMACS_SET_TOOLKIT_THEME
message to Lisp thread.
* src/w32term.h: Declare WM_EMACS_SET_TOOLKIT_THEME
* src/w32term.c: (w32_read_socket): Receive
WM_EMACS_SET_TOOLKIT_THEME message and set `toolkit-theme' and call
'toolkit-theme-set-functions'
</content>
</entry>
<entry>
<title>; Avoid compiler warnings in MinGW builds</title>
<updated>2025-06-01T09:05:23Z</updated>
<author>
<name>Eli Zaretskii</name>
<email>eliz@gnu.org</email>
</author>
<published>2025-06-01T09:05:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=f77c8c7d45c0efa12bea148778772b557de18b95'/>
<id>urn:sha1:f77c8c7d45c0efa12bea148778772b557de18b95</id>
<content type='text'>
* src/w32proc.c (child_proc_count, child_procs)
(Vw32_valid_locale_ids, Vw32_valid_codepages): Declare 'static'.
* src/w32inevt.c (faked_key): Declare.
* src/w32heap.c (data_region_base, data_region_end, heap): Declare.
* src/w32console.c (keyboard_handle, current_tty, cost): Declare.
* src/w32.c: Declare function pointers 'static'.
(excptr, excprec, ctxrec, g_b_init_compare_string_w)
(g_b_init_debug_break_process, LookupAccountSid_Name, dir_static)
(winsock_lib, _wsa_errlist): Declare.
* src/w32uniscribe.c: Declare function pointers 'static'.
(uniscribe_available, harfbuzz_available): Declare.
* src/w32term.c: Declare function pointers 'static'.
(vertical_scroll_bar_min_handle, horizontal_scroll_bar_min_handle)
(vertical_scroll_bar_top_border)
(vertical_scroll_bar_bottom_border)
(horizontal_scroll_bar_left_border)
(horizontal_scroll_bar_right_border, last_scroll_bar_drag_pos):
Declare 'static'.
* src/w32xfns.c (input_available, interrupt_handle, lpHead)
(lpTail, nQueue): Declare.
* src/w32menu.c: Declare function pointers 'static'.
* src/w32term.h (w32_frame_parm_handlers): Declare.
* src/w32fns.c: Declare function pointers 'static'.
(w32_darkmode, w32_color_map, deferred_msg_head, tip_frame)
(tip_timer, tip_last_string, tip_last_frame, tip_last_parms):
* src/lisp.h (daemon_type): Declare for WINDOWSNT as well.
* nt/cmdproxy.c (escape_char, child, interactive): Declare 'static'.
(Bug#78193)
</content>
</entry>
<entry>
<title>Protect against GCing of last_mouse_window</title>
<updated>2025-01-27T07:05:53Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2025-01-27T06:15:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chemacs.git/commit/?id=2e8ef0910412aef8f9f1beba7c942473ad8602bb'/>
<id>urn:sha1:2e8ef0910412aef8f9f1beba7c942473ad8602bb</id>
<content type='text'>
* src/window.c (last_mouse_window): New global var.  All static
instances removed, and all their uses replaced with this global
var.  This fixes a very unlikely bug where last_mouse_window was
GC’ed and a new window created in its place.  It also fixes several
places that assumed NIL_IS_ZERO without static_asserting it.
(init_window_once): Initialize the new var.
</content>
</entry>
</feed>
