[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1522: 23.0.60; unable to set fullheight and fixed width in one comma
From: |
Allan Gottlieb |
Subject: |
bug#1522: 23.0.60; unable to set fullheight and fixed width in one command |
Date: |
Sat, 03 Jan 2009 17:11:12 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
At Sat, 03 Jan 2009 19:04:21 +0100 martin rudalics <rudalics@gmx.at> wrote:
>> M-: (modify-frame-parameters nil '( (fullscreen . fullheight) (width . 170)
>> ))
>>
>> The height is set, but the width is not. The documentation seems to
>> suggest that both are frame-parameters and hence can be set together.
>> It works fine if two modify-frame-parameters commands are issued.
>
> Allan, could you please try the attached patch? It's not very elegant
> but maybe it does what is needed.
Works for me.
Thank you.
allan
> *** frame.c.~1.407.~ 2009-01-02 07:40:38.046875000 +0100
> --- frame.c 2009-01-03 18:57:07.437500000 +0100
> ***************
> *** 2925,2930 ****
> --- 2925,2932 ----
> int left_no_change = 0, top_no_change = 0;
> int icon_left_no_change = 0, icon_top_no_change = 0;
> int fullscreen_is_being_set = 0;
> + int height_for_full_width = 0;
> + int width_for_full_height = 0;
>
> struct gcpro gcpro1, gcpro2;
>
> ***************
> *** 3006,3014 ****
> val = values[i];
>
> if (EQ (prop, Qwidth) && NATNUMP (val))
> ! width = XFASTINT (val);
> else if (EQ (prop, Qheight) && NATNUMP (val))
> ! height = XFASTINT (val);
> else if (EQ (prop, Qtop))
> top = val;
> else if (EQ (prop, Qleft))
> --- 3008,3016 ----
> val = values[i];
>
> if (EQ (prop, Qwidth) && NATNUMP (val))
> ! width_for_full_height = width = XFASTINT (val);
> else if (EQ (prop, Qheight) && NATNUMP (val))
> ! height_for_full_width = height = XFASTINT (val);
> else if (EQ (prop, Qtop))
> top = val;
> else if (EQ (prop, Qleft))
> ***************
> *** 3088,3093 ****
> --- 3090,3100 ----
> x_fullscreen_adjust (f, &width, &height, &new_top, &new_left);
> if (new_top != f->top_pos || new_left != f->left_pos)
> x_set_offset (f, new_left, new_top, 1);
> +
> + if (height_for_full_width)
> + height = height_for_full_width;
> + if (width_for_full_height)
> + width = width_for_full_height;
> }
>
> /* Don't set these parameters unless they've been explicitly