unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: david@ngdr.net, 25943@debbugs.gnu.org
Subject: bug#25943: 21.5  Frame Display Difficulties
Date: Fri, 03 Mar 2017 09:13:24 +0100	[thread overview]
Message-ID: <58B925A4.4060406@gmx.at> (raw)
In-Reply-To: <0b9853e8ecbdb18bb1b8c05347371a7e@127.0.0.1>

 > \f;;;\x1f -*-Mode: emacs-lisp; Coding: emacs-mule; fill-column: 100-*-
 >
 > ;;; This file is executable and shows some problems indicated below.
 > Execution is addressed further

Thank you for your mail, David

Unfortunately, it seems that the text got mangled in between, so please
consider making the comments normal text or sending it as attachment.
Some short comments:

 > ;;; The first problem is that 25.1 does not position a new frame correctly
 > unless the frame is
 > ;;; visible when created.  Starting with a visible frame is tacky because
 > of the flashing that
 > ;;; results.  Command simple-doit-1 demonstrates this,

What does this command demonstrate?  The flashing or some wrong
positioning?  Could you come up with a one-step example where the frame
gets positioned differently in the two versions you mention?  Here the
frame just moves around my screen getting larger with every step.

 > see below for notes
 > on execution.
 >
 > ;;; I spent a lot of time looking in the wrong places for a bug, but have
 > concluded that the problem
 > ;;; is more of a design issue.  I think that I have identified what is
 > happening, but I leave that
 > ;;; to you to judge.  The problem appears at xterm.c:10971, and is alluded
 > to in window.c:2335-2340.
 >
 > ;;; This is from window.c
 > ;;;		     /* Yuck!!  If we've just created the frame and the
 > ;;;			window-manager requested the user to place it
 > ;;;			manually, the window may still not be considered
 > ;;;			`visible'.  I'd argue it should be at least
 > ;;;			something like `iconified', but don't know how to do
 > ;;;			that yet.  --Stef  */

Can you tell me why you think that this is relevant for the problem at
hand?  Where does your code need candidate_p?

 > ;;; This is part of x_make_frame_visible at line xterm.c:10963
 > ;;;       Don't do this if the window has never been visible before,
 > ;;;       because the window manager may choose the position
 > ;;;       and we don't want to override it.  */
 > ;;;
 > ;;;    if (! FRAME_VISIBLE_P (f)
 > ;;;	&& ! FRAME_ICONIFIED_P (f)
 > ;;;	&& ! FRAME_X_EMBEDDED_P (f)
 > ;;;	&& f->win_gravity == NorthWestGravity
 > ;;;   	&& previously_visible)

This part of the code was in xterm.c at least in 2003 as

     if (! FRAME_VISIBLE_P (f) && ! FRAME_ICONIFIED_P (f)
	&& f->output_data.x->win_gravity == NorthWestGravity
	&& previously_visible)

Why do you think it's impact on the behavior of your code changed?

 > ;;; So, my case is that I create a frame and want to position it before I
 > make it visible, this is
 > ;;; nothing to do with the window manager.

I'm afraid it does.  The window manager might not want to position an
invisible frame.

 > I can solve the problem by
 > eliminating the
 > ;;; "previously_visible" part of the test above, and I am doing that as a
 > temporary get-around.
 > ;;; But, of course, that elimination cuts across your window manager
 > concern.

The previously_visible check should be present in your Emacs 23.2
version.  So something else must be involved here.

 > ;;; The third problem was to have been demonstrated with another command,
 > but I have been unable to
 > ;;; reproduce the problem in a simple function.  The problem is a sometime
 > occurring,
 > ;;; display-wrecking, problem.  I wonder if it is not even an emacs
 > problem, but due to underlying
 > ;;; rendering library code.  The problem is repeatable.  Also, it is new
 > in 25.1 compared with 23.2.
 >
 > ;;; What I have done is take a screen shot showing the problem, a .jpg
 > image is attached, the screen
 > ;;; shot is cropped.  What is shown is two frames, the green frame is a
 > frame generated by executing
 > ;;; code (similar to simple-doit-1, but considerably more complicated),
 > the cream frame is the main
 > ;;; emacs frame.  The black is the xterm background.  The frame windows
 > are displaying the same
 > ;;; buffer, at the same time, normally these displays are identical
 > because the buffer is the same.
 > ;;; The green frame in the image shows a distorted text display, this
 > frame always is correctly
 > ;;; sized for the correct text.  The break at the sixty-first column is
 > repeatable, but other
 > ;;; displays break at other places.

The frames look very special - no modelines, no echo area, no scroll
bars, no decorations but for the title bar of the green frame.  Could
you try to remove all these specialities so we can compare the frames
more easily?

Thanks, martin





  reply	other threads:[~2017-03-03  8:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03  3:51 bug#25943: 21.5 Frame Display Difficulties david
2017-03-03  8:13 ` martin rudalics [this message]
     [not found]   ` <af552a322a8a630796cbddf1133b6dbe@127.0.0.1>
2017-03-04  9:59     ` martin rudalics
2017-03-07  1:51       ` david
2017-03-07  9:45         ` martin rudalics
2017-03-08 22:58           ` david
2017-03-09  8:56             ` martin rudalics
2017-03-10 18:44               ` david
2017-03-11 10:21                 ` martin rudalics
2017-03-23  7:59                   ` martin rudalics
2017-03-28 22:43                     ` david
2017-03-29  7:36                       ` martin rudalics
2017-03-29 19:53                         ` david
2017-03-30  7:29                           ` martin rudalics
2017-04-01  4:35                             ` david
2017-04-01  7:36                               ` martin rudalics
     [not found]                                 ` <7ee8200b866d8067514fb8b0bb9e814b@127.0.0.1>
2017-04-02  7:55                                   ` martin rudalics
2017-04-04  0:35                                     ` david
2017-04-04  7:25                                       ` martin rudalics
2017-04-07  0:12                                         ` david
2017-04-07  5:56                                           ` martin rudalics
2017-04-07 21:16                                             ` david
2022-04-25 14:48                                               ` Lars Ingebrigtsen
2022-05-24 12:50                                                 ` Lars Ingebrigtsen
2017-04-07 21:19                                             ` david
2017-04-08  9:00                                               ` martin rudalics
2017-04-11  6:49                     ` martin rudalics

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=58B925A4.4060406@gmx.at \
    --to=rudalics@gmx.at \
    --cc=25943@debbugs.gnu.org \
    --cc=david@ngdr.net \
    /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).