From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 14841@debbugs.gnu.org
Subject: bug#14841: Frames created invisible have their visibility parameter set to t
Date: Sat, 20 Jul 2013 15:53:50 +0300 [thread overview]
Message-ID: <83vc45xuht.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SQVRdrU0PrM8g2SA46K-w28ja3FrKPppSbLADUL7791MA@mail.gmail.com>
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Sun, 14 Jul 2013 19:02:27 +0200
> Cc: 14841@debbugs.gnu.org
>
> On Sun, Jul 14, 2013 at 6:52 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > I'm confused: what did you expect to happen instead?
>
> After this, (nil t) instead of (t t)
>
> >> emacs -Q
> >> M-: (make-frame '((visibility))) <RET>
> >> M-: (mapcar #'frame-visible-p (frame-list)) <RET>
> >> => (t t)
>
> because:
>
> 1) (make-frame '((visibility))) == (make-frame '((visibility . nil)))
> 2) The frame *is* invisible
> 3) If you do this instead: M-: (progn (make-frame '((visibility)))
> (mapcar #'frame-visible-p (frame-list))) <RET>, you get (nil t)
This happens because we get a WM_SIZE message, in response to which we
unconditionally set the frame as visible:
case WM_SIZE:
f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
/* Inform lisp of whether frame has been iconified etc. */
if (f)
{
switch (msg.msg.wParam)
{
....
case SIZE_MAXIMIZED:
case SIZE_RESTORED:
{
bool iconified = FRAME_ICONIFIED_P (f);
SET_FRAME_VISIBLE (f, 1); <<<<<<<<<<<<<<<<<<<<<
SET_FRAME_ICONIFIED (f, 0);
I'm out of my depth here, as I know close to nothing about the details
of these messages, and why are they sent to us, even though the frame
is created invisible. But try the changes below for a few days, and
if they don't have any adverse effects, I will install them.
=== modified file 'src/w32term.c'
--- src/w32term.c 2013-07-18 16:50:05 +0000
+++ src/w32term.c 2013-07-20 12:41:06 +0000
@@ -4360,8 +4360,9 @@ w32_read_socket (struct terminal *termin
SET_FRAME_VISIBLE (f, 1);
SET_FRAME_ICONIFIED (f, 0);
SET_FRAME_GARBAGED (f);
- DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
- SDATA (f->name)));
+ if (!f->output_data.w32->asked_for_visible)
+ DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
+ SDATA (f->name)));
/* WM_PAINT serves as MapNotify as well, so report
visibility changes properly. */
@@ -4819,7 +4820,8 @@ w32_read_socket (struct terminal *termin
{
bool iconified = FRAME_ICONIFIED_P (f);
- SET_FRAME_VISIBLE (f, 1);
+ if (iconified)
+ SET_FRAME_VISIBLE (f, 1);
SET_FRAME_ICONIFIED (f, 0);
/* wait_reading_process_output will notice this
next prev parent reply other threads:[~2013-07-20 12:53 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 15:14 bug#14841: Frames created invisible have their visibility parameter set to t Juanma Barranquero
2013-07-11 15:33 ` Eli Zaretskii
2013-07-11 15:39 ` Juanma Barranquero
2013-07-11 16:29 ` Eli Zaretskii
2013-07-11 16:54 ` Juanma Barranquero
2013-07-14 16:52 ` Eli Zaretskii
2013-07-14 17:02 ` Juanma Barranquero
2013-07-19 13:04 ` Juanma Barranquero
2013-07-20 12:56 ` Eli Zaretskii
2013-07-20 13:01 ` Juanma Barranquero
2013-07-20 13:39 ` Eli Zaretskii
2013-07-20 14:54 ` Juanma Barranquero
2013-07-20 15:48 ` Eli Zaretskii
2013-07-20 16:09 ` Eli Zaretskii
2013-07-20 16:57 ` Juanma Barranquero
2013-07-20 17:37 ` Eli Zaretskii
2013-07-23 23:36 ` Juanma Barranquero
2013-07-20 16:35 ` Juanma Barranquero
2013-07-20 12:53 ` Eli Zaretskii [this message]
2013-07-20 12:55 ` Juanma Barranquero
2013-07-24 16:50 ` Juanma Barranquero
2013-07-25 19:17 ` Eli Zaretskii
2013-07-25 19:35 ` Eli Zaretskii
2013-07-25 20:17 ` Juanma Barranquero
2013-07-26 0:11 ` Juanma Barranquero
2013-07-26 6:32 ` Eli Zaretskii
2013-07-26 9:37 ` Juanma Barranquero
2013-07-26 10:01 ` Eli Zaretskii
2013-07-26 10:01 ` Eli Zaretskii
2013-07-27 12:43 ` martin rudalics
2013-07-27 13:03 ` Eli Zaretskii
2013-07-27 13:30 ` martin rudalics
2013-07-27 15:31 ` Eli Zaretskii
2013-07-28 8:40 ` martin rudalics
2013-07-28 14:59 ` Eli Zaretskii
2013-07-29 7:54 ` martin rudalics
2013-07-29 15:26 ` Eli Zaretskii
2013-07-29 16:58 ` martin rudalics
2013-07-29 18:37 ` Eli Zaretskii
2013-07-30 9:12 ` martin rudalics
2013-07-30 15:31 ` Eli Zaretskii
2013-07-30 16:16 ` martin rudalics
2013-07-30 14:11 ` martin rudalics
2013-07-30 15:52 ` Eli Zaretskii
2013-07-31 8:33 ` martin rudalics
2013-08-06 8:56 ` martin rudalics
2013-07-28 22:08 ` Juanma Barranquero
2013-07-29 16:36 ` Eli Zaretskii
2013-07-26 6:31 ` Eli Zaretskii
2013-07-26 9:37 ` Juanma Barranquero
2013-07-11 16:54 ` Glenn Morris
2013-07-11 16:55 ` Juanma Barranquero
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=83vc45xuht.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=14841@debbugs.gnu.org \
--cc=lekktu@gmail.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.