unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: martin rudalics <rudalics@gmx.at>
Cc: 25818@debbugs.gnu.org
Subject: bug#25818: 25.2; frame moved off display does not return (OS X)
Date: Sun, 26 Feb 2017 20:42:37 +0100	[thread overview]
Message-ID: <m2lgssn3gy.fsf@aurox.ch> (raw)
In-Reply-To: <58B30634.1090904@gmx.at> (martin rudalics's message of "Sun, 26 Feb 2017 17:45:40 +0100")

On Sun, Feb 26 2017 at 05:45:40 pm, martin rudalics wrote:

>>> See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18801.  It's
>>> possible that the problem was introduced from 24.3 to 24.4.
>>
>> I built 24.3 and 24.4 from source, and it is correct that a regression
>> with Emacs' handling of the window system in OS X happened between those
>> two releases.
>>
>> The form I suggested to show the issue,
> [...]
>> works correctly on 24.3 but not on 24.4 (24.4 has the same behavior as
>> 25.1 and 25.2, detailed in my first message).  I guess the regression
>> would be in src/nsterm.m, or maybe src/nsfns.m.
>
> So something seems to have happened that Emacs fell into the same trap
> as other applications (which, in my understanding, is that the frame
> gets displayed on another, probably non-existent, monitor).  I'm afraid
> that my only suggestion is to bisect the sources until you've found the
> culprit.
>
> (I suppose you verified that the value returned by ‘display-pixel-width’
> is the same in 24.3 and 24.4.)

No, I did not; thanks for the reminder.  In 24.3, with a second monitor
plugged in, (display-pixel-width) returns 1280, i.e. the width only of
my primary monitor.  In 24.4, in the same situation,
(display-pixel-width) returns 2330 = (+ 1280 1050).  Second monitor is
1050 pixels wide.

In both the case of 24.3 and 24.4 with no external monitor attached,
(display-pixel-width) returns 1280.

So it seems that the code for `display-pixel-width' (or code that it
calls) was changed between those releases, maybe to support multiple
monitors.

I notice now that when running the test form on 24.3, the created frame
never actually leaves the visible portion of the screen.  For example,
when the code calls (sleep-for 1) with the frame supposedly being
offscreen according to its frame parameters (right before step 2), the
frame is in reality maybe 50 pixels left of the screen's right edge.
This is with just one monitor.  When I run the example with two
monitors, the frame just spills into the second monitor but does not go
further (since 24.3 does not seem to give correct values for
`display-pixel-width' with multiple monitors).

So it seems like there used to be code in Emacs that prevented a frame
from programmatically leaving the screen area in OS X.  For example, in
24.3, if I call (modify-frame-parameters nil '((left . 10000))), the
frame is put, as above, about 50 pixels left of the screen's right edge.





  reply	other threads:[~2017-02-26 19:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 20:04 bug#25818: 25.2; frame moved off display does not return (OS X) Charles A. Roelli
2017-02-23  8:49 ` martin rudalics
2017-02-26 11:26   ` Charles A. Roelli
2017-02-26 15:40     ` Charles A. Roelli
2017-02-26 16:45       ` martin rudalics
2017-02-26 19:42         ` Charles A. Roelli [this message]
2017-02-27  8:05           ` martin rudalics
2017-02-27 10:34             ` Charles A. Roelli
2017-02-27 20:47             ` Charles A. Roelli
2017-02-28 10:12               ` Charles A. Roelli
2017-02-28 13:20               ` Anders Lindgren
2017-02-28 15:05                 ` Charles A. Roelli
2017-02-28 20:35                   ` Anders Lindgren
2017-02-28 22:05                     ` Drew Adams
2017-03-01 10:48                       ` Anders Lindgren
2017-03-01 16:10                         ` Drew Adams
2017-03-19 19:38                     ` Charles A. Roelli
2017-03-27 18:22                       ` Anders Lindgren
2017-04-02 14:14                         ` Charles A. Roelli
2017-04-03  8:33                           ` Anders Lindgren
2017-04-08 20:40                             ` Charles A. Roelli
2017-04-09 19:13                               ` Anders Lindgren
2017-04-10 19:54                                 ` Charles A. Roelli
2017-04-11 18:35                                   ` Anders Lindgren
2017-04-27 19:14                                     ` Charles A. Roelli
2017-04-27 20:05                                       ` Alan Third
2017-04-28 17:33                                         ` Charles A. Roelli
2017-05-02 20:33                                           ` Alan Third
2017-05-05 18:30                                             ` Charles A. Roelli
2017-04-29 10:30                                       ` martin rudalics
2017-04-29 11:15                                         ` Charles A. Roelli
2017-04-29 14:51                                           ` Alan Third
2017-04-29 17:23                                           ` Anders Lindgren
2017-04-30  8:32                                           ` 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=m2lgssn3gy.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --cc=25818@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).