diff options
| author | Martin Rudalics | 2009-01-05 10:29:41 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2009-01-05 10:29:41 +0000 |
| commit | 56f668f7ea5f290a9276b567aabd01caa2711a7f (patch) | |
| tree | 2decec2a6f842ee2b24ac344fdcc1e6765be9fcc /src | |
| parent | 29c455000591ba0f0aa319eae4df8c2e0b69edc4 (diff) | |
| download | emacs-56f668f7ea5f290a9276b567aabd01caa2711a7f.tar.gz emacs-56f668f7ea5f290a9276b567aabd01caa2711a7f.zip | |
(x_set_frame_parameters): Make sure height (width) get
applied when fullwidth (fullheight) is set. (Bug#1522)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 15 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 735e5355695..9052a2105a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-01-05 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * frame.c (x_set_frame_parameters): Make sure height (width) get | ||
| 4 | applied when fullwidth (fullheight) is set. (Bug#1522) | ||
| 5 | |||
| 1 | 2009-01-04 Juanma Barranquero <lekktu@gmail.com> | 6 | 2009-01-04 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * w32.c: Use 64-bit arithmetic to do FILETIME conversions. (Bug#1766) | 8 | * w32.c: Use 64-bit arithmetic to do FILETIME conversions. (Bug#1766) |
diff --git a/src/frame.c b/src/frame.c index 6de8372181f..6881df8371a 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2925,6 +2925,8 @@ x_set_frame_parameters (f, alist) | |||
| 2925 | int left_no_change = 0, top_no_change = 0; | 2925 | int left_no_change = 0, top_no_change = 0; |
| 2926 | int icon_left_no_change = 0, icon_top_no_change = 0; | 2926 | int icon_left_no_change = 0, icon_top_no_change = 0; |
| 2927 | int fullscreen_is_being_set = 0; | 2927 | int fullscreen_is_being_set = 0; |
| 2928 | int height_for_full_width = 0; | ||
| 2929 | int width_for_full_height = 0; | ||
| 2928 | 2930 | ||
| 2929 | struct gcpro gcpro1, gcpro2; | 2931 | struct gcpro gcpro1, gcpro2; |
| 2930 | 2932 | ||
| @@ -3006,9 +3008,9 @@ x_set_frame_parameters (f, alist) | |||
| 3006 | val = values[i]; | 3008 | val = values[i]; |
| 3007 | 3009 | ||
| 3008 | if (EQ (prop, Qwidth) && NATNUMP (val)) | 3010 | if (EQ (prop, Qwidth) && NATNUMP (val)) |
| 3009 | width = XFASTINT (val); | 3011 | width_for_full_height = width = XFASTINT (val); |
| 3010 | else if (EQ (prop, Qheight) && NATNUMP (val)) | 3012 | else if (EQ (prop, Qheight) && NATNUMP (val)) |
| 3011 | height = XFASTINT (val); | 3013 | height_for_full_width = height = XFASTINT (val); |
| 3012 | else if (EQ (prop, Qtop)) | 3014 | else if (EQ (prop, Qtop)) |
| 3013 | top = val; | 3015 | top = val; |
| 3014 | else if (EQ (prop, Qleft)) | 3016 | else if (EQ (prop, Qleft)) |
| @@ -3088,6 +3090,15 @@ x_set_frame_parameters (f, alist) | |||
| 3088 | x_fullscreen_adjust (f, &width, &height, &new_top, &new_left); | 3090 | x_fullscreen_adjust (f, &width, &height, &new_top, &new_left); |
| 3089 | if (new_top != f->top_pos || new_left != f->left_pos) | 3091 | if (new_top != f->top_pos || new_left != f->left_pos) |
| 3090 | x_set_offset (f, new_left, new_top, 1); | 3092 | x_set_offset (f, new_left, new_top, 1); |
| 3093 | |||
| 3094 | /* When height was set and we want fullwidth make sure | ||
| 3095 | height gets applied. */ | ||
| 3096 | if (height_for_full_width && (f->want_fullscreen & FULLSCREEN_WIDTH)) | ||
| 3097 | height = height_for_full_width; | ||
| 3098 | /* When width was set and we want fullheight make sure | ||
| 3099 | width gets applied. */ | ||
| 3100 | if (width_for_full_height && (f->want_fullscreen & FULLSCREEN_HEIGHT)) | ||
| 3101 | width = width_for_full_height; | ||
| 3091 | } | 3102 | } |
| 3092 | 3103 | ||
| 3093 | /* Don't set these parameters unless they've been explicitly | 3104 | /* Don't set these parameters unless they've been explicitly |