summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-12-26 15:57:06 +0800
committerPo Lu <luangruo@yahoo.com>2022-12-26 15:57:48 +0800
commitcc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c (patch)
tree07d54371ad2a25bd0f01b0cfbfeffefb574f87cc /src/frame.h
parent419ca81809c2eda9c9f102b7da820a6eb9685cc8 (diff)
downloademacs-cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c.tar.gz
Redisplay "invisible" frames that are actually visible on modern X
* etc/NEWS: Document that "invisible" frames are now redisplayed if the compositing manager is still displaying it as part of a thumbnail out of Emacs's control. * src/dispnew.c (Fredraw_display): Use FRAME_REDISPLAY_P. * src/frame.h (FRAME_REDISPLAY_P): New macro. * src/xdisp.c (clear_garbaged_frames, echo_area_display) (prepare_menu_bars, redisplay_internal, display_and_set_cursor) (gui_clear_cursor): Use FRAME_REDISPLAY_P to determine whether or not a frame should be redisplayed. * src/xfns.c (Fx_create_frame): Set visibility state initially. * src/xterm.c (handle_one_xevent): Likewise. * src/xterm.h (struct x_output): New field `visibility_state'.
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/frame.h b/src/frame.h
index dcd32036b86..f29cc249ea8 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1010,6 +1010,20 @@ default_pixels_per_inch_y (void)
/* True if frame F is currently visible. */
#define FRAME_VISIBLE_P(f) (f)->visible
+/* True if frame F should be redisplayed. This is normally the same
+ as FRAME_VISIBLE_P (f). Under X, frames can continue to be
+ displayed to the user by the compositing manager even if they are
+ invisible, so this also checks whether or not the frame is reported
+ visible by the X server. */
+
+#ifndef HAVE_X_WINDOWS
+#define FRAME_REDISPLAY_P(f) (FRAME_VISIBLE_P (f))
+#else
+#define FRAME_REDISPLAY_P(f) (FRAME_VISIBLE_P (f) \
+ || (FRAME_X_P (f) \
+ && FRAME_X_VISIBLE (f)))
+#endif
+
/* True if frame F is currently visible but hidden. */
#define FRAME_OBSCURED_P(f) ((f)->visible > 1)