From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#31031: 27.0; (elisp) `Position Parameters', floating-point values Date: Tue, 03 Apr 2018 14:35:42 +0200 Message-ID: <877epowjq9.fsf@gmail.com> References: <5AC3232D.1020107@gmx.at> <874lksy9vy.fsf@gmail.com> <5AC35626.2070700@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522758857 27885 195.159.176.226 (3 Apr 2018 12:34:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2018 12:34:17 +0000 (UTC) Cc: 31031@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 03 14:34:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3L8d-000798-2X for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Apr 2018 14:34:11 +0200 Original-Received: from localhost ([::1]:59360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3LAg-0002P4-N9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Apr 2018 08:36:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3LAV-0002Nb-M3 for bug-gnu-emacs@gnu.org; Tue, 03 Apr 2018 08:36:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3LAQ-000168-Di for bug-gnu-emacs@gnu.org; Tue, 03 Apr 2018 08:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56321) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3LAQ-000164-97 for bug-gnu-emacs@gnu.org; Tue, 03 Apr 2018 08:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f3LAQ-0000w5-33 for bug-gnu-emacs@gnu.org; Tue, 03 Apr 2018 08:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Apr 2018 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31031 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31031-submit@debbugs.gnu.org id=B31031.15227589523583 (code B ref 31031); Tue, 03 Apr 2018 12:36:02 +0000 Original-Received: (at 31031) by debbugs.gnu.org; 3 Apr 2018 12:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:35985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3LAG-0000vi-FM for submit@debbugs.gnu.org; Tue, 03 Apr 2018 08:35:52 -0400 Original-Received: from mail-wm0-f41.google.com ([74.125.82.41]:38706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3LAE-0000vW-QM for 31031@debbugs.gnu.org; Tue, 03 Apr 2018 08:35:51 -0400 Original-Received: by mail-wm0-f41.google.com with SMTP id i3so11094579wmf.3 for <31031@debbugs.gnu.org>; Tue, 03 Apr 2018 05:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=WOpwq1cDAd2RdIWkZrWSwuba47OJCdsUKz5gcIbH/3M=; b=QoyTBfAv1dTiNuEdg9RFQjBO8UnBvUc18jBT5pb3czagYHDIDWEYC2ulricwlwEfWd 0z91mDgpoZtWi1B0ZuU/rQTbzPHzyhZbuSjzFjqplUn83lcD6Nt3BgM0lZKLwN3UGWgn tgYK5tFO9sD9rqiPtV7yDrYu5gGiXeXdC6rJoZRg8gEEjRJDoMH12BnOG/AEA7kv1xrA TM95EjfboW8YQ9FUxTH91fgKA5OP6k+xH7uWN0jDOdPqZcmr8hTnhBcKxdGNwNQI8KQz nDhYR1aAytBAB+2xzyIF2m/w1jr/qTc0V1YZYRgnLKd3n+WQkBYI2I2msSZNmhmJIcTg pbtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=WOpwq1cDAd2RdIWkZrWSwuba47OJCdsUKz5gcIbH/3M=; b=aC31NAwTBqDjKj1s13XRvNix2alQkeXuWaPrtOt9PC9GXaE+Dth3Fv9wpf+9Xk3kjt QbXN9+kCZwSS6+xmkD/D3T1K0ZKT/y0vg6hD4TGxKC1EBsObPHmf+8s6cr6wfdbi0Cm/ 3/HkvktMmI9Gzw5EuRyejQ5z61JKshBWWwTHc1ExICx8p4DyvZMJa8WVAmdWVhb0IoS1 yjFZQqZofIS5nr2ZfJL+/gLYBiwTcZmYG9un9BYGGmy7yI1ImAjvWzKarOwsYrhIpAd8 t59j0ujJoSEEZqho4YDhihtFonmrskRkTBYUxIjmzdl7ZmMz6SC6anS0lXnswmo6Rmbz IqBw== X-Gm-Message-State: AElRT7EmurDzXT9b5bE1+lxszgCFb+7c161SPEe+NwE2RApb3x2XMB8i 6+AdzKB105+hNqKm50yBtTQqvbHUQEk= X-Google-Smtp-Source: AIpwx4/GKWU/OtIl0SyzUYnpNcyKbP/G+SCM6WfSPST4+/vY12sRLyU00zuhMOdpDaEzxblZnk7gqw== X-Received: by 10.80.148.49 with SMTP id p46mr16305323eda.311.1522758944384; Tue, 03 Apr 2018 05:35:44 -0700 (PDT) Original-Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id n3sm1807708edl.27.2018.04.03.05.35.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Apr 2018 05:35:43 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <5AC35626.2070700@gmx.at> (martin rudalics's message of "Tue, 03 Apr 2018 12:23:34 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144845 Archived-At: martin rudalics writes: >>>> (modify-frame-parameters nil '((left . 0.0))) >> >> I see the same: the frame always ends up flush left on the leftmost >> monitor, regardless of whether it=CA=BCs initially displayed on the left= or >> right. > > Thanks for testing. I suppose that's the expected behavior. > >>>> (modify-frame-parameters nil '((left . 1.0))) >> >> This flushes almost [1] to the right when the frame is already >> positioned on the rightmost monitor. When the frame is positioned on >> the leftmost monitor, it ends up on the right edge of the left >> monitor. Which monitor is primary doesn=CA=BCt matter, only the relative >> positioning. > > This sounds wrong. I suppose the frame should move to the right edge > of the rightmost monitor. I=CA=BCm undecided on this now. See below. >> I certainly find the current behaviour inconsistent: either the >> repositioning should happen only within the workarea of each monitor, >> or it should happen within the sum of the two workareas. What we have >> now behaves differently depending on whether you flush left or flush >> right. > > Can you try fixing that in some consistent manner? You can find the > corresponding code in x_calc_absolute_position in xterm.c. BTW, does > it work right when you use the "(- POS)" specification? (modify-frame-parameters nil '((user-position . t) (left . (- 0)))) gives the same offset effect as (modify-frame-parameters nil '((user-position . t) (left . 1.0))) >> Note that if I specify to my window manager that one of the monitors >> is above the other rather than to the right, then the frame >> repositioning always occurs within the confines of the monitor >> displaying the frame. > > Did you try specifying the "top" parameter in that configuration? D'oh. Of course, top is the right parameter to use. With that the frame switches monitor between top and bottom, so that would imply that the same switching should happen for "left". I=CA=BCm undecided so far as to which I think is the "correct" behaviour. >> [1] Not completely to the right, but that=CA=BCs a different issue > > Probably a problem with calculating the decorations. Does > (frame-geometry) return "reasonable" values for your frame? (display-monitor-attributes-list) (((name . "XWAYLAND0") (geometry 0 540 3840 2160) (workarea 0 540 3840 2094) (mm-size 350 190) (frames # # #) (source . "Gdk"))) (modify-frame-parameters nil '((user-position . t) (left . 1.0))) (frame-geometry) ((outer-position 2340 . 1730) (outer-size 1480 . 824) (external-border-size 20 . 20) (outer-border-width . 0) (title-bar-size 0 . 70) (menu-bar-external . t) (menu-bar-size 0 . 0) (tool-bar-external . t) (tool-bar-position . top) (tool-bar-size 0 . 0) (internal-border-width . 0)) (+ 2340 1480) =3D> 3820, + external-border-size? In any case, visually the frame is not flush right. If I correct the visual aspect: (modify-frame-parameters nil '((left . (+ 2400)))) (frame-geometry) ((outer-position 2380 . 1586) (outer-size 1480 . 824) (external-border-size 20 . 20) (outer-border-width . 0) (title-bar-size 0 . 70) (menu-bar-external . t) (menu-bar-size 0 . 0) (tool-bar-external . t) (tool-bar-position . top) (tool-bar-size 0 . 0) (internal-border-width . 0)) which to me says there=CA=BCs a (-20) error for the outer-position at least. I=CA=BCll take a look at x_calc_absolute_position. Robert