From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 55208@debbugs.gnu.org
Subject: bug#55208: 29.0.50; MS-Windows GUI selection dialogs and double-buffering
Date: Sun, 08 May 2022 13:33:40 +0800 [thread overview]
Message-ID: <87o808611n.fsf@yahoo.com> (raw)
In-Reply-To: <83zgjty68z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 May 2022 13:41:32 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
> diff --git a/src/w32fns.c b/src/w32fns.c
> index 0f25c1a..e5becb5 100644
> --- a/src/w32fns.c
> +++ b/src/w32fns.c
> @@ -247,6 +247,8 @@ #define MENU_FREE_DELAY 1000
>
> static int w32_unicode_gui;
>
> +static bool w32_selection_dialog_open;
> +
> /* From w32menu.c */
> int menubar_in_use = 0;
>
> @@ -4184,6 +4186,16 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
> update_rect.left, update_rect.top,
> update_rect.right, update_rect.bottom));
> #endif
> + /* Under double-buffering, update the frame from the back
> + buffer, to prevent a "ghost" of the selection dialog to
> + be left on display while the user selects in the dialog. */
> + if (w32_selection_dialog_open
> + && !w32_disable_double_buffering
> + && FRAME_OUTPUT_DATA (f)->paint_dc)
> + 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 ();
>
> @@ -7755,6 +7767,15 @@ w32_dialog_in_progress (Lisp_Object in_progress)
> {
> Lisp_Object frames, frame;
>
> + /* Indicate to w32_wnd_proc that the selection dialog is about to be
> + open (or was closed, if IN_PROGRESS is nil). */
> + if (!w32_disable_double_buffering)
> + {
> + enter_crit ();
> + w32_selection_dialog_open = !NILP (in_progress);
> + leave_crit ();
> + }
> +
> /* Don't let frames in `above' z-group obscure dialog windows. */
> FOR_EACH_FRAME (frames, frame)
> {
This seems to work fine, please go ahead and install it. Thanks.
next prev parent reply other threads:[~2022-05-08 5:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-01 16:03 bug#55208: 29.0.50; MS-Windows GUI selection dialogs and double-buffering Eli Zaretskii
2022-05-02 1:10 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-02 2:29 ` Eli Zaretskii
2022-05-02 2:41 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 7:40 ` Eli Zaretskii
2022-05-07 8:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 9:02 ` Eli Zaretskii
2022-05-07 9:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 10:06 ` Eli Zaretskii
2022-05-07 10:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 10:41 ` Eli Zaretskii
2022-05-08 5:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-08 6:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o808611n.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=55208@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).