unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ralf Angeli <angeli@caeruleus.net>
Subject: Re: GNU Emacs no longer honours top and left parameters to	make-frame
Date: Sat, 07 Oct 2006 21:28:14 +0200	[thread overview]
Message-ID: <eg8v4c$fqg$1@sea.gmane.org> (raw)
In-Reply-To: wlfyekl0ls.wl%mituharu@math.s.chiba-u.ac.jp

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

* YAMAMOTO Mitsuharu (2006-09-22) writes:

>>>>>> On Thu, 21 Sep 2006 22:30:47 +0200, Ralf Angeli <angeli@caeruleus.net> said:
>
>> Does anybody know if there is another variable where the (top and
>> left) values given to `make-frame' are stored and which could be
>> used by w32_createwindow to look them up?
>
> f->top_pos and f->left_pos, which are set in x_figure_window_size.
>
> As I said in http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg01367.html,
> whether we should honor these variables has something to do with size
> hints.  Maybe you can simply check f->size_hint_flags, which is also
> set in x_figure_window_size, against USPosition and PPosition to
> decide that.

Thanks for the hint.  The attached patch checks the value of
f->size_hint_flags in order to decide if the f->left_pos and
f->top_pos values should be used.

With the patch applied stuff like (make-frame '((top . 10))) works
now.  The only drawback is that the value of f->size_hint_flags does
not allow to determine if both top and left positions or only one is
set.  That means in case of the make-frame call above, for example,
the frame is horizontally positioned at the left edge of the desktop,
as the default value for f->left_pos is 0.

Here is a change log entry:

2006-10-07  Ralf Angeli  <angeli@caeruleus.net>

	* w32fns.c (w32_createwindow): Honour left and top positions if
	supplied explicitely.

-- 
Ralf

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: w32fns.patch --]
[-- Type: text/x-patch, Size: 707 bytes --]

Index: w32fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32fns.c,v
retrieving revision 1.277
diff -u -r1.277 w32fns.c
--- w32fns.c	24 Sep 2006 09:04:56 -0000	1.277
+++ w32fns.c	7 Oct 2006 19:15:59 -0000
@@ -2108,7 +2108,12 @@
 	}
     }
 
-  if (EQ (left, Qunbound) && EQ (top, Qunbound))
+  if (f->size_hint_flags & USPosition || f->size_hint_flags & PPosition)
+    {
+      XSETINT (left, f->left_pos);
+      XSETINT (top, f->top_pos);
+    }
+  else if (EQ (left, Qunbound) && EQ (top, Qunbound))
     {
       /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
 	 for anything that is not a number and is not Qunbound.  */

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2006-10-07 19:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20  4:42 GNU Emacs no longer honours top and left parameters to make-frame Krishnakumar B
2006-09-20 17:15 ` Ralf Angeli
2006-09-21 20:30   ` Ralf Angeli
2006-09-22  9:19     ` YAMAMOTO Mitsuharu
2006-10-07 19:28       ` Ralf Angeli [this message]
2006-10-07 20:10         ` Jason Rumney
2006-10-07 22:46         ` GNU Emacs no longer honours top and left parameterstomake-frame mituharu
2006-10-08  7:27           ` Ralf Angeli
2006-10-28 22:38             ` Ralf Angeli
2006-10-29  4:26               ` Eli Zaretskii
2006-10-29 11:10                 ` Ralf Angeli
2006-11-04 12:21                   ` Eli Zaretskii
2006-09-22  9:28     ` GNU Emacs no longer honours top and left parameters to make-frame Kim F. Storm
2006-09-24 20:02       ` Ralf Angeli
2006-09-22 12:49     ` Eli Zaretskii
2006-09-24 19:48       ` Ralf Angeli

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='eg8v4c$fqg$1@sea.gmane.org' \
    --to=angeli@caeruleus.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).