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: Mon, 02 May 2022 09:10:53 +0800 [thread overview]
Message-ID: <87levkpwma.fsf@yahoo.com> (raw)
In-Reply-To: <83mtg15jg9.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 May 2022 19:03:18 +0300")
Eli Zaretskii <eliz@gnu.org> 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.
next prev parent reply other threads:[~2022-05-02 1:10 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87levkpwma.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.