[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: size hints and tiling window managers
From: |
Jan Djärv |
Subject: |
Re: size hints and tiling window managers |
Date: |
Sat, 8 Dec 2012 10:15:23 +0100 |
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 <address@hidden>:
>>>>>> "mr" == martin rudalics <address@hidden> 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 <address@hidden> OpenPGP: 1024D/ED7DAEA6
- Re: size hints and tiling window managers, (continued)
- Re: size hints and tiling window managers, martin rudalics, 2012/12/07
- Re: size hints and tiling window managers, Eli Zaretskii, 2012/12/07
- Re: size hints and tiling window managers, James Cloos, 2012/12/07
- Re: size hints and tiling window managers, Eli Zaretskii, 2012/12/08
- Re: size hints and tiling window managers, Jonas Bernoulli, 2012/12/09
- Re: size hints and tiling window managers, Eli Zaretskii, 2012/12/09
- Re: size hints and tiling window managers, Jonas Bernoulli, 2012/12/15
- Re: size hints and tiling window managers, Eli Zaretskii, 2012/12/15
- Re: size hints and tiling window managers, Giorgos Keramidas, 2012/12/11
- Re: size hints and tiling window managers, Eli Zaretskii, 2012/12/11
- Re: size hints and tiling window managers,
Jan Djärv <=