mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
Fix Fns_block_system_sleep to respect activity_id lifetime (bug#81577)
* src/nsfns.m (Fns_block_system_sleep): Move unblock_input after setting activity_id.
This commit is contained in:
parent
769bd89281
commit
71df1ea6d0
|
|
@ -3940,8 +3940,6 @@ The position is returned as a cons cell (X . Y) of the
|
|||
activity_id = [[NSProcessInfo processInfo]
|
||||
beginActivityWithOptions: activity_options
|
||||
reason: reason];
|
||||
unblock_input ();
|
||||
|
||||
if (!sleep_block_map)
|
||||
sleep_block_map = [[NSMutableDictionary alloc] initWithCapacity: 25];
|
||||
|
||||
|
|
@ -3949,10 +3947,14 @@ The position is returned as a cons cell (X . Y) of the
|
|||
{
|
||||
[sleep_block_map setObject: activity_id
|
||||
forKey: [NSNumber numberWithInt: ++sleep_block_id]];
|
||||
unblock_input ();
|
||||
return make_fixnum (sleep_block_id);
|
||||
}
|
||||
else
|
||||
return Qnil;
|
||||
{
|
||||
unblock_input ();
|
||||
return Qnil;
|
||||
}
|
||||
}
|
||||
|
||||
DEFUN ("ns-unblock-system-sleep",
|
||||
|
|
|
|||
Loading…
Reference in a new issue