diff options
| author | Jim Blandy | 1992-12-06 22:17:30 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-12-06 22:17:30 +0000 |
| commit | a46595273a936b8bd4bf9e35ee581ce9868d1522 (patch) | |
| tree | af63055b3709e83f04c481313ecf93fb0bc1bc8c /src | |
| parent | 323405deb65196b8c499cd49333ef204b26d6cf1 (diff) | |
| download | emacs-a46595273a936b8bd4bf9e35ee581ce9868d1522.tar.gz emacs-a46595273a936b8bd4bf9e35ee581ce9868d1522.zip | |
* frame.h (struct frame): New fields called async_visible and
async_iconified.
(FRAME_SAMPLE_VISIBILITY): New macro, with MULTI_FRAME and
non-MULTI_FRAME definitions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.h | 55 |
1 files changed, 50 insertions, 5 deletions
diff --git a/src/frame.h b/src/frame.h index 1a87e6c618d..d15526951e1 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -116,14 +116,35 @@ struct frame | |||
| 116 | /* Nonzero if last attempt at redisplay on this frame was preempted. */ | 116 | /* Nonzero if last attempt at redisplay on this frame was preempted. */ |
| 117 | char display_preempted; | 117 | char display_preempted; |
| 118 | 118 | ||
| 119 | /* Nonzero if frame is currently displayed. */ | 119 | /* visible is nonzero if the frame is currently displayed; we check |
| 120 | char visible; | 120 | it to see if we should bother updating the frame's contents. |
| 121 | 121 | ||
| 122 | /* Nonzero if window is currently iconified. | 122 | iconified is nonzero if the frame is currently iconified. |
| 123 | This and visible are mutually exclusive. */ | 123 | |
| 124 | char iconified; | 124 | Asynchronous input handlers should NOT change these directly; |
| 125 | instead, they should change async_visible or async_iconified, and | ||
| 126 | let the FRAME_SAMPLE_VISIBILITY macro set visible and iconified | ||
| 127 | at the next redisplay. | ||
| 128 | |||
| 129 | These should probably be considered read-only by everyone except | ||
| 130 | FRAME_SAMPLE_VISIBILITY. | ||
| 131 | |||
| 132 | This two are mutually exclusive. They might both be zero, if the | ||
| 133 | frame has been made invisible without an icon. */ | ||
| 134 | char visible, iconified; | ||
| 135 | |||
| 136 | /* Asynchronous input handlers change these, and | ||
| 137 | FRAME_SAMPLE_VISIBILITY copies them into visible and iconified. | ||
| 138 | See FRAME_SAMPLE_VISIBILITY, below. */ | ||
| 139 | #ifdef __STDC__ | ||
| 140 | volatile | ||
| 141 | #endif | ||
| 142 | char async_visible, async_iconified; | ||
| 125 | 143 | ||
| 126 | /* Nonzero if this frame should be redrawn. */ | 144 | /* Nonzero if this frame should be redrawn. */ |
| 145 | #ifdef __STDC__ | ||
| 146 | volatile | ||
| 147 | #endif | ||
| 127 | char garbaged; | 148 | char garbaged; |
| 128 | 149 | ||
| 129 | /* True if frame actually has a minibuffer window on it. | 150 | /* True if frame actually has a minibuffer window on it. |
| @@ -200,6 +221,27 @@ typedef struct frame *FRAME_PTR; | |||
| 200 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos | 221 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos |
| 201 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame | 222 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame |
| 202 | 223 | ||
| 224 | /* Emacs's redisplay code could become confused if a frame's | ||
| 225 | visibility changes at arbitrary times. For example, if a frame is | ||
| 226 | visible while the desired glyphs are being built, but becomes | ||
| 227 | invisible before they are updated, then some rows of the | ||
| 228 | desired_glyphs will be left marked as enabled after redisplay is | ||
| 229 | complete, which should never happen. The next time the frame | ||
| 230 | becomes visible, redisplay will probably barf. | ||
| 231 | |||
| 232 | Currently, there are no similar situations involving iconified, but | ||
| 233 | the principle is the same. | ||
| 234 | |||
| 235 | So instead of having asynchronous input handlers directly set and | ||
| 236 | clear the frame's visibility and iconification flags, they just set | ||
| 237 | the async_visible and async_iconified flags; the redisplay code | ||
| 238 | calls the FRAME_SAMPLE_VISIBILITY macro before doing any redisplay, | ||
| 239 | which sets visible and iconified from their asynchronous | ||
| 240 | counterparts. */ | ||
| 241 | #define FRAME_SAMPLE_VISIBILITY(f) \ | ||
| 242 | ((f)->visible = (f)->async_visible, \ | ||
| 243 | (f)->iconified = (f)->async_iconified) | ||
| 244 | |||
| 203 | #define CHECK_FRAME(x, i) \ | 245 | #define CHECK_FRAME(x, i) \ |
| 204 | { \ | 246 | { \ |
| 205 | if (! FRAMEP (x)) \ | 247 | if (! FRAMEP (x)) \ |
| @@ -303,6 +345,9 @@ extern int message_buf_print; | |||
| 303 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) | 345 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) |
| 304 | #define FRAME_FOCUS_FRAME(f) (0) | 346 | #define FRAME_FOCUS_FRAME(f) (0) |
| 305 | 347 | ||
| 348 | /* See comments in definition above. */ | ||
| 349 | #define FRAME_SAMPLE_VISIBILITY(f) (0) | ||
| 350 | |||
| 306 | #define CHECK_FRAME(x, i) do; while (0) | 351 | #define CHECK_FRAME(x, i) do; while (0) |
| 307 | #define CHECK_LIVE_FRAME(x, y) do; while (0) | 352 | #define CHECK_LIVE_FRAME(x, y) do; while (0) |
| 308 | 353 | ||