From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: frame size&position woes Date: Wed, 24 Jul 2013 17:37:17 +0300 Message-ID: <83hafkvxb6.fsf@gnu.org> References: <51EBEA23.2000805@gmx.at> <51ECEBDB.8010203@gmx.at> <837ggiy4ko.fsf@gnu.org> <83y58yvvse.fsf@gnu.org> <83ppu8wr1d.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1374676654 11004 80.91.229.3 (24 Jul 2013 14:37:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 14:37:34 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 24 16:37:35 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V20C6-0003q3-Iq for ged-emacs-devel@m.gmane.org; Wed, 24 Jul 2013 16:37:34 +0200 Original-Received: from localhost ([::1]:59868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V20C6-0001AP-2I for ged-emacs-devel@m.gmane.org; Wed, 24 Jul 2013 10:37:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V20Bz-00019r-0c for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:37:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V20Bx-00061A-Gk for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:37:26 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:55358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V20Bx-000610-85 for emacs-devel@gnu.org; Wed, 24 Jul 2013 10:37:25 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MQG0060038Y4B00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Wed, 24 Jul 2013 17:37:23 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MQG006U43AB4400@a-mtaout23.012.net.il>; Wed, 24 Jul 2013 17:37:23 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162108 Archived-At: > From: Juanma Barranquero > Date: Wed, 24 Jul 2013 12:42:49 +0200 > Cc: martin rudalics , Emacs developers > > On Wed, Jul 24, 2013 at 5:55 AM, Eli Zaretskii wrote: > > > You should be able to approximate that by multiplying the > > character-unit dimensions by the pixel size of the default face's > > font. > > Yes. That's what I called "crude heuristics". Then "crude" must be non-derogatory description. > Let's assume there's a new option > `desktop-restore-frames-move-onscreen'. If the user sets it to t, and > I move back a frame that was really visible, but just by a few pixels, > that's a tiny failure. But if I don't move back a frame that is a few > pixels off, and so, harder to access for the user without UI tricks or > M-: (modify-frame-parameters ...), that's a worse problem (not earth > shattering, but definitely not very user-friendly). Which means that, > to be safe, the heuristics must include a small constant factor to err > on the safe side. Crude. So yes, I'll do it, but certainly not having > a get-frame-window-system-metrics pains me. Is that something rounding up to the next integral multiple of the default font size couldn't take care of? IOW, err on the safe side. > > It's good enough for me, because currently I have to restore my frames > > manually every time I quit and restart Emacs for some reason. > > Uh? Have you filed a bug report about it? No.