From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.devel Subject: Re: size hints and tiling window managers Date: Fri, 07 Dec 2012 20:42:00 -0500 Message-ID: References: <87zk1r104d.fsf@bernoul.li> <50C1C678.5040805@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354931382 22729 80.91.229.3 (8 Dec 2012 01:49:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 01:49:42 +0000 (UTC) Cc: martin rudalics , Jonas Bernoulli To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 08 02:49:55 2012 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 1Th9Y1-0001Mn-Uw for ged-emacs-devel@m.gmane.org; Sat, 08 Dec 2012 02:49:46 +0100 Original-Received: from localhost ([::1]:39703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th9Xp-0005hy-RT for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2012 20:49:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th9Xl-0005hp-Rv for emacs-devel@gnu.org; Fri, 07 Dec 2012 20:49:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th9Xk-0006Re-HG for emacs-devel@gnu.org; Fri, 07 Dec 2012 20:49:29 -0500 Original-Received: from eagle.jhcloos.com ([207.210.242.212]:51484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th9Xk-0006P3-7C for emacs-devel@gnu.org; Fri, 07 Dec 2012 20:49:28 -0500 Original-Received: by eagle.jhcloos.com (Postfix, from userid 10) id 7DBA7400C5; Sat, 8 Dec 2012 01:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1354931361; bh=kfM6IT+gMl83s97guoEix5KoVafWW0FX1EckN3Rs+hI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=0krX2A2CKzLclAzV7g9eVeeocieT2KhkVOh7IXAJWAWgbKLLbBcY44HNjHwPJy/X4 qa9zk0qIb8G2lk2PE551pGPK5O/zp2ZLXCmFUzCt9fbudyps0ZOm59vh45S1VZLFgu Cj59z7cZhTX5/xV3zsTXaugchpn3TJg5luFxQJUI= Original-Received: by carbon.jhcloos.org (Postfix, from userid 500) id C465D6001E; Sat, 8 Dec 2012 01:42:00 +0000 (UTC) In-Reply-To: <50C1C678.5040805@gmx.at> (martin rudalics's message of "Fri, 07 Dec 2012 11:35:36 +0100") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX///8ZGXBQKKnCrDQ3 AAAAJElEQVQImWNgQAAXzwQg4SKASgAlXIEEiwsSIYBEcLaAtMEAADJnB+kKcKioAAAAAElFTkSu QmCC Copyright: Copyright 2012 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Original-Lines: 70 X-Hashcash: 1:30:121208:emacs-devel@gnu.org::5m0rGm1UUtie5qj0:00000000000000000000000000000000000000000lUcuq X-Hashcash: 1:30:121208:rudalics@gmx.at::SQFvK21wwvnDleXU:00cL7H X-Hashcash: 1:30:121208:jonas@bernoul.li::Yy1Ou6xGed9Y4MuP:nWf0z X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 207.210.242.212 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:155355 Archived-At: >>>>> "mr" == martin rudalics writes: mr> Eli said that he can provide arbitrary frame pixel sizes at any time. Doesn't it just require not setting the .width_inc and .height_inc members of the size_hints struct in src/xterm.c and src/gtkutil.c, and editing the .min_width and .min_height code to account for that? Something like the (as yet untested, and X-only) code below? If so, I presume that it should be configurable, yes? That would require some effort to work out. -JimC === modified file 'src/gtkutil.c' --- src/gtkutil.c 2012-12-03 19:15:52 +0000 +++ src/gtkutil.c 2012-12-08 01:35:39 +0000 @@ -1357,9 +1357,7 @@ size_hints = f->output_data.x->size_hints; hint_flags = f->output_data.x->hint_flags; - hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE; - size_hints.width_inc = FRAME_COLUMN_WIDTH (f); - size_hints.height_inc = FRAME_LINE_HEIGHT (f); + hint_flags |= GDK_HINT_MIN_SIZE; hint_flags |= GDK_HINT_BASE_SIZE; /* Use one row/col here so base_height/width does not become zero. @@ -1374,8 +1372,8 @@ size_hints.base_width = base_width; size_hints.base_height = base_height; - size_hints.min_width = base_width + min_cols * size_hints.width_inc; - size_hints.min_height = base_height + min_rows * size_hints.height_inc; + size_hints.min_width = base_width + min_cols * FRAME_COLUMN_WIDTH (f); + size_hints.min_height = base_height + min_rows * FRAME_LINE_HEIGHT (f); /* These currently have a one to one mapping with the X values, but I don't think we should rely on that. */ === modified file 'src/xterm.c' --- src/xterm.c 2012-12-04 15:15:05 +0000 +++ src/xterm.c 2012-12-08 01:34:26 +0000 @@ -9534,8 +9534,6 @@ size_hints.height = FRAME_PIXEL_HEIGHT (f); size_hints.width = FRAME_PIXEL_WIDTH (f); - size_hints.width_inc = FRAME_COLUMN_WIDTH (f); - size_hints.height_inc = FRAME_LINE_HEIGHT (f); size_hints.max_width = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)) - FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0); size_hints.max_height = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)) @@ -9564,8 +9562,8 @@ size_hints.flags |= PBaseSize; size_hints.base_width = base_width; size_hints.base_height = base_height + FRAME_MENUBAR_HEIGHT (f); - size_hints.min_width = base_width + min_cols * size_hints.width_inc; - size_hints.min_height = base_height + min_rows * size_hints.height_inc; + size_hints.min_width = base_width + min_cols * FRAME_COLUMN_WIDTH (f); + size_hints.min_height = base_height + min_rows * FRAME_LINE_HEIGHT (f); } /* If we don't need the old flags, we don't need the old hint at all. */ -- James Cloos OpenPGP: 1024D/ED7DAEA6