From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Feng Shu" Newsgroups: gmane.emacs.devel Subject: Re: Child-frame can not move to proper position when run "env GDK_SCALE=2 emacs" Date: Tue, 09 Jan 2018 07:03:23 +0800 Message-ID: <87608c54xw.fsf@163.com> References: <87wp0sy3bq.fsf@163.com> <5A53B5C5.70105@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515452537 27510 195.159.176.226 (8 Jan 2018 23:02:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 23:02:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Feng Shu , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 09 00:02:13 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eYgQj-0006Yb-IU for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2018 00:02:10 +0100 Original-Received: from localhost ([::1]:36850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYgSj-0004s4-83 for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 18:04:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYgS6-0004re-UW for emacs-devel@gnu.org; Mon, 08 Jan 2018 18:03:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYgS3-0000Hg-PK for emacs-devel@gnu.org; Mon, 08 Jan 2018 18:03:34 -0500 Original-Received: from m12-14.163.com ([220.181.12.14]:53868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYgS3-0000GX-2R for emacs-devel@gnu.org; Mon, 08 Jan 2018 18:03:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=JcGs4 AgbfGbGEkVCezKhM8zgNgkCeL2uVn8zfDUCZCE=; b=PmYdfUNR8pVcs+zVsjcCG JxYCMFFWzRBNyeVKxfcAaQdXRFQSDFxK0iGmboZcGomiFfnnB+2FfWHvyqnCasdK D6ekrx8mwpgkcduodxxnzSpbfI6q7nvmrd1RBqM5v6OQs8roViLXimz3EUQ4+Jff QVyVy2aPCgdmuO5iCSZqY8= Original-Received: from tumashu (unknown [183.206.89.48]) by smtp10 (Coremail) with SMTP id DsCowAB3Hme8+FNadug3Bw--.36007S2; Tue, 09 Jan 2018 07:03:24 +0800 (CST) In-Reply-To: <5A53B5C5.70105@gmx.at> (martin rudalics's message of "Mon, 08 Jan 2018 19:17:41 +0100") X-CM-TRANSID: DsCowAB3Hme8+FNadug3Bw--.36007S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GF1ftw1xWrW8Wr47CrW7Arb_yoWxtFg_Z3 9ayFs2kw17XFsrtw1DAwsrAF97Xw1qvr4DGw4UXr4rJry7C39xWFyUW39Ivw42yw1ftrZ3 KF1kXrySgrs3AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8fhL5UUUUU== X-Originating-IP: [183.206.89.48] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiwB3H1FXlcZEpNgAAsB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.12.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221735 Archived-At: martin rudalics writes: >> When I run "env GDK_SCALE=2 emacs", the below code can not work properly >> >> ``` >> (let ((test (let ((after-make-frame-functions nil)) >> (make-frame >> `((parent-frame . ,(window-frame)) >> (width . 50) >> (height . 1))))) >> (pos (posn-x-y (posn-at-point (point) (selected-window))))) >> (set-frame-position test (car pos) (cdr pos))) >> ``` >> >> When I eval the code at the , the new created frame can not move to >> , it move to the wrong position. > > What happens when you divide the pos values by two? When (/ x 2) and (/ y 2), It works! :-) > > We do not expose the GTK/GDK scale values in Lisp, maybe we should. > Robert any ideas? > > martin > --