all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Tollef Fog Heen <tfheen@err.no>
Cc: Eli Zaretskii <eliz@gnu.org>, 66398@debbugs.gnu.org
Subject: bug#66398: 29.1; Buggy handling of transparency changes / blur/unblur
Date: Mon, 16 Oct 2023 08:51:31 +0800	[thread overview]
Message-ID: <87y1g375kc.fsf@yahoo.com> (raw)
In-Reply-To: <87sf6b7iee.fsf@err.no> (Tollef Fog Heen's message of "Sun, 15 Oct 2023 22:14:17 +0200")

Tollef Fog Heen <tfheen@err.no> writes:

> There are two places where XChangeProperty is called in that function, I
> put the backtrace on both, but only one seems to be hit after startup.
>
> I did:
> - start emacs under gdb, find the frame id, etc, pass that to xprop
> - focus emacs frame
> - unfocus emacs frame
> - focus emacs frame
> - M-x
> - unfocus emacs frame, C-c in gdb
>
> I assume you're not interested in the initial backtraces from when emacs
> is starting up.

Oh, I see, thanks.  Please test the attached patch:

diff --git a/src/xterm.c b/src/xterm.c
index 517bdf57aab..5d491e63778 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11820,7 +11820,9 @@ x_frame_highlight (struct frame *f)
   x_stop_ignoring_errors (dpyinfo);
   unblock_input ();
   gui_update_cursor (f, true);
-  x_set_frame_alpha (f);
+
+  if (!FRAME_X_OUTPUT (f)->alpha_identical_p)
+    x_set_frame_alpha (f);
 }
 
 static void
@@ -11844,7 +11846,15 @@ x_frame_unhighlight (struct frame *f)
   unblock_input ();
 
   gui_update_cursor (f, true);
-  x_set_frame_alpha (f);
+
+  /* Eschew modifying the frame alpha when the alpha values for
+     focused and background frames are identical; otherwise, this will
+     upset the order in which changes to the alpha property
+     immediately subsequent to a focus change are propagated into a
+     frame's alpha property.  (bug#66398) */
+
+  if (!FRAME_X_OUTPUT (f)->alpha_identical_p)
+    x_set_frame_alpha (f);
 }
 
 /* The focus has changed.  Update the frames as necessary to reflect





  reply	other threads:[~2023-10-16  0:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 20:07 bug#66398: 29.1; Buggy handling of transparency changes / blur/unblur Tollef Fog Heen
2023-10-14  8:13 ` Eli Zaretskii
2023-10-14  8:23   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 17:31     ` Tollef Fog Heen
2023-10-15  1:25       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-15 20:14         ` Tollef Fog Heen
2023-10-16  0:51           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-16  4:42             ` Tollef Fog Heen
2023-10-16  4:44               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-16 11:51                 ` Eli Zaretskii
2023-10-17  0:34                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87y1g375kc.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66398@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=tfheen@err.no \
    /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.