diff options
| author | Karl Heuer | 1995-06-11 20:48:19 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-11 20:48:19 +0000 |
| commit | 9382638d7b82cdaafa66974624cea1dbc994fed0 (patch) | |
| tree | 05a235f3ec2b09497276ce2cb2b47f99cbf45895 /src | |
| parent | cbef58c016fa93352a680969f9dd87ac9bac6064 (diff) | |
| download | emacs-9382638d7b82cdaafa66974624cea1dbc994fed0.tar.gz emacs-9382638d7b82cdaafa66974624cea1dbc994fed0.zip | |
(x_make_frame_visible): Test and set asked_for_visible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index f4d0fc8e543..072974a0ec2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -236,6 +236,34 @@ static int x_io_error_quitter (); | |||
| 236 | void x_catch_errors (); | 236 | void x_catch_errors (); |
| 237 | void x_uncatch_errors (); | 237 | void x_uncatch_errors (); |
| 238 | 238 | ||
| 239 | #if 0 | ||
| 240 | /* This is a function useful for recording debugging information | ||
| 241 | about the sequence of occurrences in this file. */ | ||
| 242 | |||
| 243 | struct record | ||
| 244 | { | ||
| 245 | char *locus; | ||
| 246 | int type; | ||
| 247 | }; | ||
| 248 | |||
| 249 | struct record event_record[100]; | ||
| 250 | |||
| 251 | int event_record_index; | ||
| 252 | |||
| 253 | record_event (locus, type) | ||
| 254 | char *locus; | ||
| 255 | int type; | ||
| 256 | { | ||
| 257 | if (event_record_index == sizeof (event_record) / sizeof (struct record)) | ||
| 258 | event_record_index = 0; | ||
| 259 | |||
| 260 | event_record[event_record_index].locus = locus; | ||
| 261 | event_record[event_record_index].type = type; | ||
| 262 | event_record_index++; | ||
| 263 | } | ||
| 264 | |||
| 265 | #endif /* 0 */ | ||
| 266 | |||
| 239 | /* Return the struct x_display_info corresponding to DPY. */ | 267 | /* Return the struct x_display_info corresponding to DPY. */ |
| 240 | 268 | ||
| 241 | struct x_display_info * | 269 | struct x_display_info * |
| @@ -5073,6 +5101,13 @@ XTframe_raise_lower (f, raise) | |||
| 5073 | 5101 | ||
| 5074 | /* Change of visibility. */ | 5102 | /* Change of visibility. */ |
| 5075 | 5103 | ||
| 5104 | /* This tries to wait until the frame is really visible. | ||
| 5105 | However, if the window manager asks the user where to position | ||
| 5106 | the frame, this will return before the user finishes doing that. | ||
| 5107 | The frame will not actually be visible at that time, | ||
| 5108 | but it will become visible later when the window manager | ||
| 5109 | finishes with it. */ | ||
| 5110 | |||
| 5076 | x_make_frame_visible (f) | 5111 | x_make_frame_visible (f) |
| 5077 | struct frame *f; | 5112 | struct frame *f; |
| 5078 | { | 5113 | { |
| @@ -5087,9 +5122,16 @@ x_make_frame_visible (f) | |||
| 5087 | 5122 | ||
| 5088 | if (! FRAME_VISIBLE_P (f)) | 5123 | if (! FRAME_VISIBLE_P (f)) |
| 5089 | { | 5124 | { |
| 5090 | if (! FRAME_ICONIFIED_P (f)) | 5125 | /* We test FRAME_GARBAGED_P here to make sure we don't |
| 5126 | call x_set_offset a second time | ||
| 5127 | if we get to x_make_frame_visible a second time | ||
| 5128 | before the window gets really visible. */ | ||
| 5129 | if (! FRAME_ICONIFIED_P (f) | ||
| 5130 | && ! f->display.x->asked_for_visible) | ||
| 5091 | x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0); | 5131 | x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0); |
| 5092 | 5132 | ||
| 5133 | f->display.x->asked_for_visible = 1; | ||
| 5134 | |||
| 5093 | if (! EQ (Vx_no_window_manager, Qt)) | 5135 | if (! EQ (Vx_no_window_manager, Qt)) |
| 5094 | x_wm_set_window_state (f, NormalState); | 5136 | x_wm_set_window_state (f, NormalState); |
| 5095 | #ifdef USE_X_TOOLKIT | 5137 | #ifdef USE_X_TOOLKIT |