From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: frame size&position woes Date: Mon, 22 Jul 2013 11:40:49 +0200 Message-ID: References: <51EBEA23.2000805@gmx.at> <51ECEBDB.8010203@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1374486098 25977 80.91.229.3 (22 Jul 2013 09:41:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jul 2013 09:41:38 +0000 (UTC) Cc: Emacs developers To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 11:41:40 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 1V1Cca-0006sG-MI for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 11:41:36 +0200 Original-Received: from localhost ([::1]:34104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Cca-0002bH-BN for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2013 05:41:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1CcW-0002b9-Dl for emacs-devel@gnu.org; Mon, 22 Jul 2013 05:41:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1CcU-0004Bc-Nb for emacs-devel@gnu.org; Mon, 22 Jul 2013 05:41:32 -0400 Original-Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:37935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1CcU-0004BP-Gf for emacs-devel@gnu.org; Mon, 22 Jul 2013 05:41:30 -0400 Original-Received: by mail-ea0-f174.google.com with SMTP id o10so3678244eaj.5 for ; Mon, 22 Jul 2013 02:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=JtA4AweY6KTSSM4N9qRXwCdVOqXmcMfHMOrPAi7Q37Y=; b=ZE1RH0eEe7vd2orY/xGrwMD9vbr54tVMW2oTqkFvkCF0WOQgyayGdZ1FJn/s728v6+ rm/kzM2nsWaUhIcxa3nMd+rl1Z5kiVgjrqW5BojmVAfwOc/sOGUIH/8qMvyIVTaJBxZe Lq/oP8hJRcp5YButfeOv7FXeSujWEv7bP2ovXW53QdLJUKNN8i6fWuePjzgU+b2aN/df 8kA3eLarXsK7cK/ePSKhKBdcHVSl5cBbfd4SQy18C+S42e+4zPZBrHGH2P/pH8hQo8d5 ace5bKyD6gOJNqAP0l/2kpVbFUPRXLWYbte+Hh5FtCCf32J4IJjuc7Dql4tQaBcJDFjd KlCw== X-Received: by 10.14.218.8 with SMTP id j8mr26802773eep.129.1374486089762; Mon, 22 Jul 2013 02:41:29 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Mon, 22 Jul 2013 02:40:49 -0700 (PDT) In-Reply-To: <51ECEBDB.8010203@gmx.at> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22e 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:162067 Archived-At: On Mon, Jul 22, 2013 at 10:22 AM, martin rudalics wrote: > Admittedly, it's not easy to specify what the height should be in this > case. Which highlights that the usefulness of `frame-height' is relatively limited. > There are various ways to deal with this. Here on Windows most > GUN/Linux-derived applications (I suppose GUN/Linux is a NRA-approved GNU/Linux distribution? ;-) > either truncate menu bar entries if they > don't fit or don't allow to make a window smaller than the actual width > of its menu bar. Honestly, at this point I'd rather have Emacs do one of these things, that the current "incredible shrinking frame" phenomenon with wrapping menus that I reported in another message. > IIUC on Windows we would need a function like `w32-frame-rect' I posted > earlier and, in addition, need access to a NONCLIENTMETRICS structure to > determine whether the menubar wrapped or its font is just too high. > This means that we would have to say whether the height of the window > rectangle minus those of client rectangle, caption and two borders > equals the height of a menubar (or some multiple). I love how two simple requests: "Can I have the dimensions of that frame, please?" and "Can I create another frame with that very same metrics?" get so complex and GUI dependent answers. > The idea would be to start with an invisible frame and making it visible > once we're done. But I'm 100% sure that many platforms won't get us the > metrics of an invisible frame. Yeah, I suspect as much. > I hardly ever know whether and when `modify-frame-parameters' has a > visible effect. This function is a time bomb. I'd agree that modify-frame-parameters (and/or the frame parameters per se) are a bit underspecified, yes. J