unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: James Cloos <cloos@jhcloos.com>
To: emacs-devel@gnu.org
Cc: martin rudalics <rudalics@gmx.at>, Jonas Bernoulli <jonas@bernoul.li>
Subject: Re: size hints and tiling window managers
Date: Fri, 07 Dec 2012 20:42:00 -0500	[thread overview]
Message-ID: <m3ip8dtj3y.fsf@carbon.jhcloos.org> (raw)
In-Reply-To: <50C1C678.5040805@gmx.at> (martin rudalics's message of "Fri, 07 Dec 2012 11:35:36 +0100")

>>>>> "mr" == martin rudalics <rudalics@gmx.at> 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 <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



  parent reply	other threads:[~2012-12-08  1:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 18:55 size hints and tiling window managers Jonas Bernoulli
2012-12-07 10:35 ` martin rudalics
2012-12-07 10:45   ` Eli Zaretskii
2012-12-08  1:42   ` James Cloos [this message]
2012-12-08  9:01     ` Eli Zaretskii
2012-12-09 19:23       ` Jonas Bernoulli
2012-12-09 19:36         ` Eli Zaretskii
2012-12-15 23:33           ` Jonas Bernoulli
2012-12-16  4:42             ` Eli Zaretskii
2012-12-11  8:07       ` Giorgos Keramidas
2012-12-11  8:10         ` Eli Zaretskii
2012-12-08  9:15     ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ip8dtj3y.fsf@carbon.jhcloos.org \
    --to=cloos@jhcloos.com \
    --cc=emacs-devel@gnu.org \
    --cc=jonas@bernoul.li \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).