From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55208: 29.0.50; MS-Windows GUI selection dialogs and double-buffering Date: Mon, 02 May 2022 09:10:53 +0800 Message-ID: <87levkpwma.fsf@yahoo.com> References: <83mtg15jg9.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37102"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 55208@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 02 03:12:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nlKbk-0009Mr-1w for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 03:12:12 +0200 Original-Received: from localhost ([::1]:52018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlKbi-0000zd-Gf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 May 2022 21:12:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlKba-0000zD-Cu for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 21:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlKba-0001m7-4C for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 21:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlKbZ-0003pC-Tw for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 21:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2022 01:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55208 X-GNU-PR-Package: emacs Original-Received: via spool by 55208-submit@debbugs.gnu.org id=B55208.165145386814639 (code B ref 55208); Mon, 02 May 2022 01:12:01 +0000 Original-Received: (at 55208) by debbugs.gnu.org; 2 May 2022 01:11:08 +0000 Original-Received: from localhost ([127.0.0.1]:34532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlKai-0003o2-EA for submit@debbugs.gnu.org; Sun, 01 May 2022 21:11:08 -0400 Original-Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:33371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlKag-0003nZ-UT for 55208@debbugs.gnu.org; Sun, 01 May 2022 21:11:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651453861; bh=/4S0SsMPW/YMd5whyoTipSReQDV+4iq9wV6/1YYSQG0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=JqF+c9Wdw5qebr7PgTXESJcvTal4iNZnrMH0j7oSGc3KtkIWSgecS5iKMnsIeDTRGMpdNUMXNIObq2pCwpDDZfxLDTDJDeqVgCl4N+zqMswTUux0+Qngry09J1RU453TbMIWa7kaRa5tnSYPbBxIu9zF/uM7GUgpd+DCp0Wu64dZTCEgV5nwEbIMqhGnlASJgsTMZ5kjhz2x+6rf+lgZy9dUoubA0ER9Rs9XIrp+wVHz3UIP2EGqZkEZSk8xXEmP2aYZhQ0zs/xVoS9DgkNSJct4DuDCBEtgyEiawY3pWXe9RLCm874NTlZKet2y/fcvTW22KDS3H3/jpAjXrchQXw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651453861; bh=QcKhEEuv/snt3r/OjMeuZgA5RjL9mhmkZkMWIZ968oe=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GuNt9LtVZxyewhf43Ks08iSAU50IUcRSoW7m0jyMUHeE7j4J1HejFqu/Vt7m+SSDADdTAZFdVKoGVU8V1R4LtaancHNCimD9ympwHqIBhspeYAeNN5lVFhu9zaM8dRR8tIOktMY0Zy9h2z9/mE1c3H5n98WBhdHTSpX8/gnetcDeThNG1mF6O4tYIBvYJuU/Y7Vf/TS83KQ/A5MerNKhQYugZ4zWDLTwEhWElSdtZQWVFiXhnej2XxtG/MQZLOfCxc6TW9sh7BgSdao+7thTG755grCFlpuQB5b/3LFs4yNMFBnClUUk0Flu4SMoo5dWS41yOGKVvmsJJZavbijIvg== X-YMail-OSG: QAtCay0VM1m6urGKj3pGJtDEdRKgl7HI9yZ4GX59RG49Lr.hgCH11gmEhYFJlaU QZMfebvF0822tuJ9VM17HIpQkyY4_jr6FzYJi0UESVwqE7J_eeQW0XgpqfZ5D.ohWThjzcGBYbT. RWbbdfOWq8vF6VQl8tHsG2ZQYYG7kkA2ruF_xPhUda9qoaTfFTYv0exn6RcqG6wfsdkJ0iXomyqu D_F9lvJm08TJme11oqrZOc9B9hpEdWZVcqEMWUet_4hlzFW0CU26RPu_R0v.8ZozQEOu8Qn0qGMZ 4H6pKYNuCV6zODaMKagO_IJQHwkbBoLpq.tdZ4zE_I6bYJjYRn49TFf9aD_b88DN7Plyqrmbji50 ggSwyYC_hK76i_KCSXSUfWt1PgQiARPQWf9XCh0Cn3F6wU7CezHs.._NFVDYUI6l6JLLKNuH5Ig7 tYs1yepS2fQ_2cWsZQkjI.3LwO1SVRijj.3ZyhJhFlkhQwCovE5_P42lPYeSVapE1OF1Ok99yKSM VVVh.bQHz7j1w_fEhkkP7mCSLNPAc6HNw37JPzAUCBwjIEFWWwZKmA.yhmgyW_kzV9QiYk32RQ_7 Pt8hz9dpW8nyi84LiHgaV0fwqnbkCmCuSOvXkTtAO9A38UhGMMuc4wvgfy5bD3sd8JBgAr586rva 4zNLZAXxxJD2MDM00nk659f6VNgAfCu3hbqdeyvQeH_dlZCQbjvbX0VUgVjou0qxVdCWzxUVZwd1 hrL8zqQ4tphLT6YG60zbqHXvVX_kkXIUF4q77QFWlAZdB.fJos7Fa_NYBXACWtZ9VoYstPhb3IIL tSNUSaFQn0cwZCOMkRmMfrOMY64gF_ykp8VgCaOd3Y X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Mon, 2 May 2022 01:11:01 +0000 Original-Received: by hermes--canary-production-sg3-795d7b4d54-tb6rw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 20264304430f8a03b02790c8bfc1b7c0; Mon, 02 May 2022 01:10:57 +0000 (UTC) In-Reply-To: <83mtg15jg9.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 May 2022 19:03:18 +0300") X-Mailer: WebService/1.1.20118 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231217 Archived-At: Eli Zaretskii writes: > The double-buffering feature on MS-Windows has one unpleasant > side-effect: when the user opens any GUI selection dialog that is > provided by the MS-Windows "toolkit", dragging that dialog leaves its > "ghost" shown in the Emacs frame. > > To reproduce: > > emacs -Q > Click File->Open File > Drag the file selection dialog with the mouse > Observe that the dialog is indeed dragged, as expected, but it leaves > its "ghost" at the original position > > I think this is related to the fact that, as long as the selection > dialog is open, we don't update the Emacs display. With > double-buffering disabled, the area across which the dialog is dragged > is cleared (the text is not "erased", and only the background > remains). Which is also not very nice, but it's much more subtle, so > much so that I don't recall any bug reports about this. Showing the > "ghost" of the menu there is much more prominent, so I hope we could > at least go back to what we have without double-buffering. Bonus > points for redrawing the text while the dialog is being dragged. I think the version of MS Windows I used to test the double-buffering feature doesn't overwrite the contents of windows underneath the topmost window, which is why I don't see that bug. But try adding some code along the following lines under `WM_PAINT' in `w32_msg_pump': if (popup is active) { enter_crit (); if (FRAME_OUTPUT_DATA (f)->paint_dc) { BeginPaint (hwnd, &paintStruct); BitBlt (FRAME_OUTPUT_DATA (f)->paint_buffer_handle, 0, 0, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f), FRAME_OUTPUT_DATA (f)->paint_dc, 0, 0, SRCCOPY); EndPaint (hwnd, &paintStruct); } leave_crit (); return 0; } (I don't know how to implement the "popup is active" part, unfortunately.) Thanks.