From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: size hints and tiling window managers Date: Sat, 8 Dec 2012 10:15:23 +0100 Message-ID: <6690A430-BFBF-4349-8ECF-AA2F5A163237@swipnet.se> References: <87zk1r104d.fsf@bernoul.li> <50C1C678.5040805@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354958144 29767 80.91.229.3 (8 Dec 2012 09:15:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 09:15:44 +0000 (UTC) Cc: martin rudalics , Jonas Bernoulli , emacs-devel@gnu.org To: James Cloos Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 08 10:15:57 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 1ThGVh-0000co-Tg for ged-emacs-devel@m.gmane.org; Sat, 08 Dec 2012 10:15:50 +0100 Original-Received: from localhost ([::1]:43781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThGVV-0000mE-9z for ged-emacs-devel@m.gmane.org; Sat, 08 Dec 2012 04:15:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThGVR-0000m2-5c for emacs-devel@gnu.org; Sat, 08 Dec 2012 04:15:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThGVM-0005b6-Py for emacs-devel@gnu.org; Sat, 08 Dec 2012 04:15:33 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]:49648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThGVM-0005ZE-F6 for emacs-devel@gnu.org; Sat, 08 Dec 2012 04:15:28 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 692429B7E for ; Sat, 8 Dec 2012 10:15:23 +0100 (CET) Original-Received: (qmail 15287 invoked by uid 89); 8 Dec 2012 09:15:22 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 8 Dec 2012 09:15:22 -0000 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 5B8F27FA05E; Sat, 8 Dec 2012 10:15:22 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.1499) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 62.20.26.67 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:155361 Archived-At: Hello. Min_height/width is not that important, they dont have to be a multiple = of frame_height/width. Not setting the height/width_inc would mean that Emacs resizes a pixel = at a time, not a row/column at the time. And those window managers that = provide resize feedback would be showing width x height as pixels = instead of columns x rows. That would be a bigger bug IMHO, than having = some pixels off at the edges. Jan D. 8 dec 2012 kl. 02:42 skrev James Cloos : >>>>>> "mr" =3D=3D martin rudalics writes: >=20 > mr> Eli said that he can provide arbitrary frame pixel sizes at any = time. >=20 > 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? >=20 > Something like the (as yet untested, and X-only) code below? >=20 > If so, I presume that it should be configurable, yes? >=20 > That would require some effort to work out. >=20 > -JimC >=20 > =3D=3D=3D 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 =3D f->output_data.x->size_hints; > hint_flags =3D f->output_data.x->hint_flags; >=20 > - hint_flags |=3D GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE; > - size_hints.width_inc =3D FRAME_COLUMN_WIDTH (f); > - size_hints.height_inc =3D FRAME_LINE_HEIGHT (f); > + hint_flags |=3D GDK_HINT_MIN_SIZE; >=20 > hint_flags |=3D GDK_HINT_BASE_SIZE; > /* Use one row/col here so base_height/width does not become zero. > @@ -1374,8 +1372,8 @@ >=20 > size_hints.base_width =3D base_width; > size_hints.base_height =3D base_height; > - size_hints.min_width =3D base_width + min_cols * = size_hints.width_inc; > - size_hints.min_height =3D base_height + min_rows * = size_hints.height_inc; > + size_hints.min_width =3D base_width + min_cols * = FRAME_COLUMN_WIDTH (f); > + size_hints.min_height =3D base_height + min_rows * = FRAME_LINE_HEIGHT (f); >=20 > /* These currently have a one to one mapping with the X values, but = I > don't think we should rely on that. */ >=20 > =3D=3D=3D 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 =3D FRAME_PIXEL_HEIGHT (f); > size_hints.width =3D FRAME_PIXEL_WIDTH (f); >=20 > - size_hints.width_inc =3D FRAME_COLUMN_WIDTH (f); > - size_hints.height_inc =3D FRAME_LINE_HEIGHT (f); > size_hints.max_width =3D x_display_pixel_width (FRAME_X_DISPLAY_INFO = (f)) > - FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0); > size_hints.max_height =3D x_display_pixel_height = (FRAME_X_DISPLAY_INFO (f)) > @@ -9564,8 +9562,8 @@ > size_hints.flags |=3D PBaseSize; > size_hints.base_width =3D base_width; > size_hints.base_height =3D base_height + FRAME_MENUBAR_HEIGHT (f); > - size_hints.min_width =3D base_width + min_cols * = size_hints.width_inc; > - size_hints.min_height =3D base_height + min_rows * = size_hints.height_inc; > + size_hints.min_width =3D base_width + min_cols * = FRAME_COLUMN_WIDTH (f); > + size_hints.min_height =3D base_height + min_rows * = FRAME_LINE_HEIGHT (f); > } >=20 > /* If we don't need the old flags, we don't need the old hint at = all. */ >=20 >=20 >=20 > --=20 > James Cloos OpenPGP: 1024D/ED7DAEA6