Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f5e70acd
Commit
f5e70acd
authored
Jun 03, 1993
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(x_set_frame_parameters): Process all parms in reverse order.
parent
ebc9936d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
16 deletions
+35
-16
src/xfns.c
src/xfns.c
+35
-16
No files found.
src/xfns.c
View file @
f5e70acd
...
...
@@ -332,26 +332,51 @@ x_set_frame_parameters (f, alist)
/* Same here. */
Lisp_Object
left
,
top
;
width
=
height
=
top
=
left
=
Qnil
;
/* Record in these vectors all the parms specified. */
Lisp_Object
*
parms
;
Lisp_Object
*
values
;
int
i
;
i
=
0
;
for
(
tail
=
alist
;
CONSP
(
tail
);
tail
=
Fcdr
(
tail
))
i
++
;
parms
=
(
Lisp_Object
*
)
alloca
(
i
*
sizeof
(
Lisp_Object
));
values
=
(
Lisp_Object
*
)
alloca
(
i
*
sizeof
(
Lisp_Object
));
/* Extract parm names and values into those vectors. */
i
=
0
;
for
(
tail
=
alist
;
CONSP
(
tail
);
tail
=
Fcdr
(
tail
))
{
Lisp_Object
elt
,
prop
,
val
;
elt
=
Fcar
(
tail
);
prop
=
Fcar
(
elt
);
val
=
Fcdr
(
elt
);
parms
[
i
]
=
Fcar
(
elt
);
values
[
i
]
=
Fcdr
(
elt
);
i
++
;
}
/* Ignore all but the first set presented. You're supposed to
be able to append two parameter lists and have the first
shadow the second. */
if
(
EQ
(
prop
,
Qwidth
)
&&
NILP
(
width
))
XSET
(
width
,
Lisp_Int
,
FRAME_WIDTH
(
f
));
XSET
(
height
,
Lisp_Int
,
FRAME_HEIGHT
(
f
));
XSET
(
top
,
Lisp_Int
,
f
->
display
.
x
->
top_pos
);
XSET
(
left
,
Lisp_Int
,
f
->
display
.
x
->
left_pos
);
/* Now process them in reverse of specified order. */
for
(
i
--
;
i
>=
0
;
i
--
)
{
Lisp_Object
prop
,
val
;
prop
=
parms
[
i
];
val
=
values
[
i
];
if
(
EQ
(
prop
,
Qwidth
))
width
=
val
;
else
if
(
EQ
(
prop
,
Qheight
)
&&
NILP
(
height
)
)
else
if
(
EQ
(
prop
,
Qheight
))
height
=
val
;
else
if
(
EQ
(
prop
,
Qtop
)
&&
NILP
(
top
)
)
else
if
(
EQ
(
prop
,
Qtop
))
top
=
val
;
else
if
(
EQ
(
prop
,
Qleft
)
&&
NILP
(
left
)
)
else
if
(
EQ
(
prop
,
Qleft
))
left
=
val
;
else
{
...
...
@@ -372,12 +397,6 @@ x_set_frame_parameters (f, alist)
{
Lisp_Object
frame
;
if
(
NILP
(
width
))
XSET
(
width
,
Lisp_Int
,
FRAME_WIDTH
(
f
));
if
(
NILP
(
height
))
XSET
(
height
,
Lisp_Int
,
FRAME_HEIGHT
(
f
));
if
(
NILP
(
top
))
XSET
(
top
,
Lisp_Int
,
f
->
display
.
x
->
top_pos
);
if
(
NILP
(
left
))
XSET
(
left
,
Lisp_Int
,
f
->
display
.
x
->
left_pos
);
XSET
(
frame
,
Lisp_Frame
,
f
);
if
(
XINT
(
width
)
!=
FRAME_WIDTH
(
f
)
||
XINT
(
height
)
!=
FRAME_HEIGHT
(
f
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment