From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 18ec3fcce9: Restore pending_signals at a point in the DND event loop Date: Sat, 16 Apr 2022 23:21:25 -0400 Message-ID: References: <165015596397.5558.5393619769224500857@vcs2.savannah.gnu.org> <20220417003924.49D86C01684@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Po Lu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 17 05:22:15 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfvUN-0007GW-2O for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Apr 2022 05:22:15 +0200 Original-Received: from localhost ([::1]:42680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfvUL-000181-By for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Apr 2022 23:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfvTl-0000Ny-0D for emacs-devel@gnu.org; Sat, 16 Apr 2022 23:21:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfvTi-0003XK-3b for emacs-devel@gnu.org; Sat, 16 Apr 2022 23:21:35 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 87BEE4415FF; Sat, 16 Apr 2022 23:21:32 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3B8BF440C7C; Sat, 16 Apr 2022 23:21:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1650165687; bh=DlPqaekOfGZPzicabqmx4TS/P5l7udhMIa4/ZjUQc+w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=UGhQMx0HF4BAtmlBAuzr7UYWhX1pU7uI4jOHtnppO0a5pSrSX6LrRYzxR+LkExZ8k tjKfTptcw5THMobWy9LJ10sCvMkmrOMaXNSJ3+2kA/4N2/ynDk3zb9ZinyRpkWIM7B SN+lzvk/MEJtRVypPpIwaRL/Y8xR5UgHQSPs+LVskoqNEO+ivRYaTaUKzpzvBMa1sT /Sj0o4xI4cq0G88E2eO26CFKAcjdENlxTs+DZz0O/grssY41IIS7Mp9OaoYwcx+AvI wsB9ID0x9cPhcXSNuivsOMQi+f6aLNJj2QW6El20LO5KmEUTj6qrza1rTqAbkIv81T g9JkKImlPKnFw== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0827C120314; Sat, 16 Apr 2022 23:21:26 -0400 (EDT) In-Reply-To: <20220417003924.49D86C01684@vcs2.savannah.gnu.org> (Po Lu via Mailing list for Emacs changes's message of "Sat, 16 Apr 2022 20:39:24 -0400 (EDT)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288518 Archived-At: > @@ -9674,7 +9675,12 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, > &next_event, &finish, &hold_quit); > #endif > #endif > + /* The unblock_input below might try to read input, but > + XTread_socket does nothing inside a drag-and-drop event > + loop, so don't let it clear the pending_signals flag. */ > + signals_were_pending = pending_signals; > unblock_input (); > + pending_signals = signals_were_pending; > > if (x_dnd_movement_frame) > { This is pretty ugly. Why is it that it "does nothing"? Any hope we can move this restoration of `pending_signals` closer to the code that "does nothing"? Stefan