diff options
| author | Martin Rudalics | 2009-01-09 07:44:00 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2009-01-09 07:44:00 +0000 |
| commit | eba7400d38bca18b05ff5acf81e2ab428fa43db1 (patch) | |
| tree | 06f6d2aa976807692cee9b2af7c0a613dd9b49ed /src | |
| parent | ab756fb3788a831e8ad24e72415626ec8815cc6c (diff) | |
| download | emacs-eba7400d38bca18b05ff5acf81e2ab428fa43db1.tar.gz emacs-eba7400d38bca18b05ff5acf81e2ab428fa43db1.zip | |
(x_set_frame_parameters): Remember requested value for
fullscreen before it's reset by the parameter handler.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 28 |
2 files changed, 26 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 22d944a48b2..db65922186a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-01-09 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * frame.c (x_set_frame_parameters): Remember requested value for | ||
| 4 | fullscreen before it's reset by the parameter handler. | ||
| 5 | |||
| 1 | 2009-01-09 Glenn Morris <rgm@gnu.org> | 6 | 2009-01-09 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * keyboard.c (last_command_char): For clarity, rename to... | 8 | * keyboard.c (last_command_char): For clarity, rename to... |
diff --git a/src/frame.c b/src/frame.c index 6881df8371a..7db5a1e1fcb 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2927,6 +2927,7 @@ x_set_frame_parameters (f, alist) | |||
| 2927 | int fullscreen_is_being_set = 0; | 2927 | int fullscreen_is_being_set = 0; |
| 2928 | int height_for_full_width = 0; | 2928 | int height_for_full_width = 0; |
| 2929 | int width_for_full_height = 0; | 2929 | int width_for_full_height = 0; |
| 2930 | enum fullscreen_type fullscreen_wanted = FULLSCREEN_NONE; | ||
| 2930 | 2931 | ||
| 2931 | struct gcpro gcpro1, gcpro2; | 2932 | struct gcpro gcpro1, gcpro2; |
| 2932 | 2933 | ||
| @@ -2969,7 +2970,7 @@ x_set_frame_parameters (f, alist) | |||
| 2969 | They are independent of other properties, but other properties (e.g., | 2970 | They are independent of other properties, but other properties (e.g., |
| 2970 | cursor_color) are dependent upon them. */ | 2971 | cursor_color) are dependent upon them. */ |
| 2971 | /* Process default font as well, since fringe widths depends on it. */ | 2972 | /* Process default font as well, since fringe widths depends on it. */ |
| 2972 | /* Also, process fullscreen, width and height depend upon that */ | 2973 | /* Also, process fullscreen, width and height depend upon that. */ |
| 2973 | for (p = 0; p < i; p++) | 2974 | for (p = 0; p < i; p++) |
| 2974 | { | 2975 | { |
| 2975 | Lisp_Object prop, val; | 2976 | Lisp_Object prop, val; |
| @@ -2983,6 +2984,19 @@ x_set_frame_parameters (f, alist) | |||
| 2983 | { | 2984 | { |
| 2984 | register Lisp_Object param_index, old_value; | 2985 | register Lisp_Object param_index, old_value; |
| 2985 | 2986 | ||
| 2987 | if (EQ (prop, Qfullscreen)) | ||
| 2988 | { | ||
| 2989 | /* The parameter handler can reset f->want_fullscreen to | ||
| 2990 | FULLSCREEN_NONE. But we need the requested value later | ||
| 2991 | to decide whether a height or width parameter shall be | ||
| 2992 | applied. Therefore, we remember the requested value in | ||
| 2993 | fullscreen_wanted for the following two cases. */ | ||
| 2994 | if (EQ (val, Qfullheight)) | ||
| 2995 | fullscreen_wanted = FULLSCREEN_HEIGHT; | ||
| 2996 | else if (EQ (val, Qfullwidth)) | ||
| 2997 | fullscreen_wanted = FULLSCREEN_WIDTH; | ||
| 2998 | } | ||
| 2999 | |||
| 2986 | old_value = get_frame_param (f, prop); | 3000 | old_value = get_frame_param (f, prop); |
| 2987 | fullscreen_is_being_set |= EQ (prop, Qfullscreen); | 3001 | fullscreen_is_being_set |= EQ (prop, Qfullscreen); |
| 2988 | if (NILP (Fequal (val, old_value))) | 3002 | if (NILP (Fequal (val, old_value))) |
| @@ -3091,13 +3105,13 @@ x_set_frame_parameters (f, alist) | |||
| 3091 | if (new_top != f->top_pos || new_left != f->left_pos) | 3105 | if (new_top != f->top_pos || new_left != f->left_pos) |
| 3092 | x_set_offset (f, new_left, new_top, 1); | 3106 | x_set_offset (f, new_left, new_top, 1); |
| 3093 | 3107 | ||
| 3094 | /* When height was set and we want fullwidth make sure | 3108 | /* When both height and fullwidth were requested, make sure the |
| 3095 | height gets applied. */ | 3109 | requested value for height gets applied. */ |
| 3096 | if (height_for_full_width && (f->want_fullscreen & FULLSCREEN_WIDTH)) | 3110 | if (height_for_full_width && fullscreen_wanted == FULLSCREEN_WIDTH) |
| 3097 | height = height_for_full_width; | 3111 | height = height_for_full_width; |
| 3098 | /* When width was set and we want fullheight make sure | 3112 | /* When both width and fullheight were requested, make sure the |
| 3099 | width gets applied. */ | 3113 | requested value for width gets applied. */ |
| 3100 | if (width_for_full_height && (f->want_fullscreen & FULLSCREEN_HEIGHT)) | 3114 | if (width_for_full_height && fullscreen_wanted == FULLSCREEN_HEIGHT) |
| 3101 | width = width_for_full_height; | 3115 | width = width_for_full_height; |
| 3102 | } | 3116 | } |
| 3103 | 3117 | ||