summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2009-01-05 10:29:41 +0000
committerMartin Rudalics <rudalics@gmx.at>2009-01-05 10:29:41 +0000
commit56f668f7ea5f290a9276b567aabd01caa2711a7f (patch)
tree2decec2a6f842ee2b24ac344fdcc1e6765be9fcc /src
parent29c455000591ba0f0aa319eae4df8c2e0b69edc4 (diff)
downloademacs-56f668f7ea5f290a9276b567aabd01caa2711a7f.tar.gz
(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/ChangeLog5
-rw-r--r--src/frame.c15
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 @@
+2009-01-05 Martin Rudalics <rudalics@gmx.at>
+
+ * frame.c (x_set_frame_parameters): Make sure height (width) get
+ applied when fullwidth (fullheight) is set. (Bug#1522)
+
2009-01-04 Juanma Barranquero <lekktu@gmail.com>
* 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)
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,9 +3008,9 @@ x_set_frame_parameters (f, alist)
val = values[i];
if (EQ (prop, Qwidth) && NATNUMP (val))
- width = XFASTINT (val);
+ width_for_full_height = width = XFASTINT (val);
else if (EQ (prop, Qheight) && NATNUMP (val))
- height = XFASTINT (val);
+ height_for_full_width = height = XFASTINT (val);
else if (EQ (prop, Qtop))
top = val;
else if (EQ (prop, Qleft))
@@ -3088,6 +3090,15 @@ x_set_frame_parameters (f, alist)
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);
+
+ /* When height was set and we want fullwidth make sure
+ height gets applied. */
+ if (height_for_full_width && (f->want_fullscreen & FULLSCREEN_WIDTH))
+ height = height_for_full_width;
+ /* When width was set and we want fullheight make sure
+ width gets applied. */
+ if (width_for_full_height && (f->want_fullscreen & FULLSCREEN_HEIGHT))
+ width = width_for_full_height;
}
/* Don't set these parameters unless they've been explicitly