all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Keith David Bershatsky <esq@lawlist.com>, 21415@debbugs.gnu.org
Subject: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Sat, 12 Sep 2015 21:57:35 +0200	[thread overview]
Message-ID: <CABr8ebaCs2KU3nG4sm7aiMnwQHOwzoRRVyUpqAcksifwUTJrjg@mail.gmail.com> (raw)
In-Reply-To: <55F40854.9070006@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 4070 bytes --]

Hi Martin and Keith!

Unfortunately, removing the suggested lines break another feature.

The system is designed so that it should be possible to programmatically
place the top of the frame above the top of the screen (when the menu bar
is hidden). This is useful to hide the window title so that the full height
of the screen can be utilised to edit text. When the suggested patch is
applied, this no longer is possible.

I would say that the problem is not related to this, but to `make-frame'
itself. When a weight higher than the default is specified, it should
adjust the window to start further down. As it is today, it always seem to
start mid screen.

Below is a small test file I have used to test the frame placement
features. If you come up with another solution, you can use it to check
that it doesn't break existing features. By the way, it's not intended to
be loaded, instead follow the comment and evaluate the expression one by
one and check that the result is as described in the file.

Sincerely,
    Anders Lindgren

;; ns-frame-test.el --- test for NextStep (Mac OS X) frame
positioning.;; Author: Anders Lindgren;; This file is *not* intended
to be loaded into Emacs. Instead, it;; contains individual expressions
that should be evaluated one by;; one, with accompanying manual test
steps.;; Future development:;;;; * Add more test cases, like
resolution change, frame stretching;;   multiple screens, and dragging
between different sized screens.;;;; * Automatic testing using a unit
test framework, for example ert.;;(error "You should not load this
file, read the file comments for details")
;; ----------------------------------------;; Basics;;;; Initially,
Emacs should be placed under the menu bar.;; After each test in this
section, it should be possible to drag the;; frame around, but it
should not be possible to drag it in under the;; menu bar.;; The
following should not place the window under the menu
bar.(set-frame-position (selected-frame) 0 -10)
;; The following will create a frame taller than screen. (90 is;;
suitable for a 1200 pixel display, you mileage may wary.);;;; The
frame should not be resized to fit the screen.(set-frame-size
(selected-frame) 80 90)
;; The following should move the frame down a bit. It should not be;;
resized to fit the screen.(set-frame-position (selected-frame) 0 50)

;; ----------------------------------------;; Auto hide menu;;;; In
this section, the auto-hide feature of the menu bar is;; tested. After
each step it should be possible do drag the window;; around. It should
not be possible to drag the window from within;; the screen to above
the screen. However, if it already is above the;; screen, it should be
possible to drag it around there.;; Start with a frame smaller than
the screen.(set-frame-size (selected-frame) 80 50)
;; After this, the menu bar should be hidden (unless the mouse
pointer;; is at the top of the screen).(setq ns-auto-hide-menu-bar t)
;; This will place the window title *above* the top of the screen
(as;; intended).(set-frame-position (selected-frame) 0 -10)
;; Frame will be higher than screen.(set-frame-size (selected-frame) 80 90)

;; ----------------------------------------;; Exit auto hide menu;;;;
Redisplay the menu bar. After this, the frame should be placed;;
*below* the menu bar.(setq ns-auto-hide-menu-bar nil)
;; ns-frame-test.el ends here.


On Sat, Sep 12, 2015 at 1:11 PM, martin rudalics <rudalics@gmx.at> wrote:

> > Commenting out the following small segment in `nsterm.m` fixes the
> > problem with large frames being created partially above the top of the
> > display -- i.e., it is no longer necessary to correct the bug by
> > following a `make-frame` with `set-frame-position` (to move it
> > squarely onto the screen) when `ns-auto-hide-menu-bar` is set to `t`.
> > As it stands now, the default position is `top 0` and `left 0` --
> > perfect!
> >
> >     if (ns_menu_bar_should_be_hidden ())
> >       return frameRect;
>
> That check probably had a purpose.  Anders, what's your opinion on
> removing it?
>
> Thanks, martin
>

[-- Attachment #2: Type: text/html, Size: 9682 bytes --]

  reply	other threads:[~2015-09-12 19:57 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 17:41 bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame Keith David Bershatsky
2015-09-04 19:17 ` martin rudalics
2015-09-05  0:31 ` Keith David Bershatsky
2015-09-05  9:59   ` martin rudalics
2015-09-06 17:18 ` Keith David Bershatsky
2015-09-06 19:26   ` martin rudalics
2015-09-06 17:56 ` Keith David Bershatsky
2015-09-06 19:26   ` martin rudalics
2015-09-06 22:01 ` Keith David Bershatsky
2015-09-07  7:05   ` martin rudalics
2015-09-07 17:53 ` Keith David Bershatsky
2015-09-08  8:29   ` martin rudalics
2015-09-08 16:13 ` Keith David Bershatsky
2015-09-08 19:22   ` martin rudalics
2015-09-09  0:38 ` Keith David Bershatsky
2015-09-09  6:27   ` martin rudalics
2015-09-09 14:30 ` Keith David Bershatsky
2015-09-09 15:53   ` martin rudalics
2015-09-09 16:26 ` Keith David Bershatsky
2015-09-09 17:11   ` martin rudalics
2015-09-10  0:46 ` Keith David Bershatsky
2015-09-10  6:57   ` martin rudalics
2015-09-10 18:39 ` Keith David Bershatsky
2015-09-12 11:11   ` martin rudalics
2015-09-12 19:57     ` Anders Lindgren [this message]
2015-09-13  9:02       ` martin rudalics
2015-09-12 11:12   ` martin rudalics
2015-09-12 18:11 ` Keith David Bershatsky
2015-09-12 23:09 ` Keith David Bershatsky
2015-09-13  9:02   ` martin rudalics
2015-09-12 23:13 ` Keith David Bershatsky
2015-09-13  7:10   ` Anders Lindgren
2015-09-13  9:02     ` martin rudalics
2015-09-13 16:17 ` Keith David Bershatsky
2015-09-13 18:01   ` martin rudalics
     [not found]     ` <CABr8ebYkM02NHh9BeU8tNfw0=eMtqJfQALAhN17VfOQtzfq9CQ@mail.gmail.com>
2015-09-13 20:21       ` bug#21415: Fwd: " Anders Lindgren
     [not found]       ` <55F6860D.9060503@gmx.at>
2015-09-14  9:37         ` Anders Lindgren
2015-09-14 13:39           ` martin rudalics
2015-09-14 14:45             ` Anders Lindgren
2015-09-14 17:37               ` martin rudalics
2015-09-14 19:03                 ` Anders Lindgren
2015-09-15  8:29                   ` martin rudalics
2015-09-19 21:12                     ` Anders Lindgren
2015-09-19 22:17                       ` martin rudalics
2015-09-20  7:25                         ` Anders Lindgren
2015-09-20  8:44                           ` martin rudalics
2015-09-20  9:27                             ` Anders Lindgren
2015-09-20  9:54                               ` martin rudalics
2015-09-20 18:29                                 ` Anders Lindgren
2015-09-21  9:42                       ` martin rudalics
2015-09-13 18:36 ` Keith David Bershatsky
2015-09-14  8:31   ` martin rudalics
2015-09-14  8:32   ` martin rudalics
2015-09-13 18:53 ` Keith David Bershatsky
2015-09-14 15:25 ` Keith David Bershatsky
2015-09-14 17:37   ` martin rudalics
2015-09-20 16:47 ` Keith David Bershatsky
2015-09-20 18:31   ` Anders Lindgren
2015-09-21  9:43     ` martin rudalics
2015-09-21 18:56       ` Anders Lindgren
2015-09-22  6:38         ` martin rudalics
2015-09-22  8:54           ` Anders Lindgren
2015-09-22  9:36             ` martin rudalics
2015-09-27 18:53               ` Anders Lindgren
2015-09-28  6:48                 ` martin rudalics
2015-09-28 21:35                   ` Anders Lindgren
2015-09-29  7:23                     ` martin rudalics
2015-09-29  7:50                       ` Eli Zaretskii
2015-09-30 17:54                       ` Anders Lindgren
2015-09-30 18:57                         ` martin rudalics
2015-09-30 21:29                           ` Anders Lindgren
2015-10-02  8:37                             ` martin rudalics
2015-10-03  6:16                               ` Anders Lindgren
2015-10-03  8:32                                 ` martin rudalics
2015-09-20 19:14 ` Keith David Bershatsky
2015-09-28 14:32 ` Keith David Bershatsky
2015-09-28 15:31   ` martin rudalics
2015-09-28 17:49 ` Keith David Bershatsky
2015-09-28 18:00   ` martin rudalics
2015-09-28 18:13 ` Keith David Bershatsky
2015-09-29  7:22   ` martin rudalics
2015-09-29 17:09 ` Keith David Bershatsky
2015-09-29 17:14   ` martin rudalics
2015-10-01  6:43 ` Keith David Bershatsky
2015-10-02  8:37   ` martin rudalics
2015-10-03 11:28 ` Andy Moreton
2015-10-03 12:31   ` martin rudalics
2015-10-05 21:02 ` Andy Moreton
2015-10-06  7:57   ` martin rudalics
2015-10-07  3:42 ` Keith David Bershatsky
2015-10-13 10:21   ` martin rudalics
2015-10-13 17:23 ` Keith David Bershatsky
2015-10-13 17:59   ` Anders Lindgren
2015-10-14  8:49   ` martin rudalics
2015-10-14 15:58 ` Keith David Bershatsky
2015-10-14 17:37   ` martin rudalics
2015-10-14 21:53     ` Anders Lindgren
2015-10-15 10:00       ` martin rudalics
2015-10-20 17:20         ` Anders Lindgren
2015-10-21  8:02           ` martin rudalics
2015-10-21 16:07             ` martin rudalics
2015-10-22 14:54               ` Anders Lindgren
2015-10-22 15:35                 ` martin rudalics
2015-10-23  9:13                   ` Anders Lindgren
2015-10-23 18:00                     ` martin rudalics
2015-10-24 15:33                       ` Anders Lindgren
2015-10-24 18:57                 ` martin rudalics
2015-10-24 21:43                   ` Anders Lindgren
2015-10-27 21:42                     ` Anders Lindgren
2015-10-28  7:54                       ` Anders Lindgren
2015-10-28  9:55                         ` martin rudalics
2015-10-28 11:25                           ` Anders Lindgren
2015-10-28 19:19                             ` martin rudalics
2015-10-29 22:53                               ` Anders Lindgren
2015-10-30  7:59                                 ` martin rudalics
2015-10-30  8:10                                   ` martin rudalics
2015-10-30  9:00                                     ` Anders Lindgren
2015-10-30  9:34                                       ` martin rudalics
2015-10-30 10:18                                         ` Anders Lindgren
2015-10-28  9:54                       ` martin rudalics
2015-10-14 20:34 ` Keith David Bershatsky
2015-10-15  9:59   ` martin rudalics
2015-10-21  1:03 ` Keith David Bershatsky
2015-10-21  2:07   ` Anders Lindgren
2015-10-29  2:47 ` Keith David Bershatsky
2015-11-14 19:42   ` Anders Lindgren
2015-11-01 16:53 ` Keith David Bershatsky
2015-11-01 21:08   ` Anders Lindgren
2015-11-02  5:18 ` Keith David Bershatsky
2015-11-02 20:50   ` Anders Lindgren
2015-11-03  6:29 ` Keith David Bershatsky
2015-11-03  8:54   ` Anders Lindgren
2015-11-04  2:21 ` Keith David Bershatsky
2015-11-04  5:53   ` Anders Lindgren
2015-11-16  3:06 ` Keith David Bershatsky
2015-11-16  9:11   ` Anders Lindgren
2020-09-17 17:53   ` Lars Ingebrigtsen
2015-11-16  3:16 ` Keith David Bershatsky
2015-11-16  7:54   ` Anders Lindgren
2015-11-16 17:25 ` Keith David Bershatsky
2015-11-16 23:52 ` Keith David Bershatsky

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=CABr8ebaCs2KU3nG4sm7aiMnwQHOwzoRRVyUpqAcksifwUTJrjg@mail.gmail.com \
    --to=andlind@gmail.com \
    --cc=21415@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    --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 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.