Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1de11f56
Commit
1de11f56
authored
Mar 10, 2012
by
Chong Yidong
Browse files
* frame.c (other_visible_frames): Don't assume selected frame is visible.
Fixes: debbugs:10955
parent
7a2c7ca7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
29 deletions
+25
-29
src/ChangeLog
src/ChangeLog
+5
-0
src/frame.c
src/frame.c
+20
-29
No files found.
src/ChangeLog
View file @
1de11f56
2012-03-10 Chong Yidong <cyd@gnu.org>
* frame.c (other_visible_frames): Don't assume the selected frame
is visible (Bug#10955).
2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
* buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
...
...
src/frame.c
View file @
1de11f56
...
...
@@ -1118,41 +1118,32 @@ Otherwise, include all frames. */)
static
int
other_visible_frames
(
FRAME_PTR
f
)
{
/* We know the selected frame is visible,
so if F is some other frame, it can't be the sole visible one. */
if
(
f
==
SELECTED_FRAME
())
{
Lisp_Object
frames
;
int
count
=
0
;
Lisp_Object
frames
;
for
(
frames
=
Vframe_list
;
CONSP
(
frames
);
frame
s
=
XC
D
R
(
frames
)
)
{
Lisp_Object
this
;
for
(
frames
=
Vframe_list
;
CONSP
(
frames
);
frames
=
XCDR
(
frames
))
{
Lisp_Object
thi
s
=
XC
A
R
(
frames
)
;
if
(
f
==
XFRAME
(
this
))
continue
;
this
=
XCAR
(
frames
);
/* Verify that the frame's window still exists
and we can still talk to it. And note any recent change
in visibility. */
/* Verify that we can still talk to the frame's X window,
and note any recent change in visibility. */
#ifdef HAVE_WINDOW_SYSTEM
if
(
FRAME_WINDOW_P
(
XFRAME
(
this
)))
{
x_sync
(
XFRAME
(
this
));
FRAME_SAMPLE_VISIBILITY
(
XFRAME
(
this
));
}
if
(
FRAME_WINDOW_P
(
XFRAME
(
this
)))
{
x_sync
(
XFRAME
(
this
));
FRAME_SAMPLE_VISIBILITY
(
XFRAME
(
this
));
}
#endif
if
(
FRAME_VISIBLE_P
(
XFRAME
(
this
))
||
FRAME_ICONIFIED_P
(
XFRAME
(
this
))
/* Allow deleting the terminal frame when at least
one X frame exists! */
||
(
FRAME_WINDOW_P
(
XFRAME
(
this
))
&&
!
FRAME_WINDOW_P
(
f
)))
count
++
;
}
return
count
>
1
;
if
(
FRAME_VISIBLE_P
(
XFRAME
(
this
))
||
FRAME_ICONIFIED_P
(
XFRAME
(
this
))
/* Allow deleting the terminal frame when at least one X
frame exists. */
||
(
FRAME_WINDOW_P
(
XFRAME
(
this
))
&&
!
FRAME_WINDOW_P
(
f
)))
return
1
;
}
return
1
;
return
0
;
}
/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
...
...
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