Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 108:360340f9fd5f r20-1b6
Import from CVS: tag r20-1b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:18:39 +0200 |
parents | cf808b4c4290 |
children | cca96a509cfe |
comparison
equal
deleted
inserted
replaced
107:523141596bda | 108:360340f9fd5f |
---|---|
1099 a frame is destroyed. */ | 1099 a frame is destroyed. */ |
1100 return; | 1100 return; |
1101 handle_focus_event_1 (f, event->type == FocusIn); | 1101 handle_focus_event_1 (f, event->type == FocusIn); |
1102 } | 1102 } |
1103 | 1103 |
1104 /* both MapNotify and VisibilityNotify can cause this */ | 1104 /* both MapNotify and VisibilityNotify can cause this |
1105 JV is_visible has the same semantics as f->visible*/ | |
1105 static void | 1106 static void |
1106 change_frame_visibility (struct frame *f, int is_visible) | 1107 change_frame_visibility (struct frame *f, int is_visible) |
1107 { | 1108 { |
1108 Lisp_Object frame = Qnil; | 1109 Lisp_Object frame = Qnil; |
1109 | 1110 |
1110 XSETFRAME (frame, f); | 1111 XSETFRAME (frame, f); |
1111 | 1112 |
1112 if (!FRAME_VISIBLE_P (f) && is_visible) | 1113 if (!FRAME_VISIBLE_P (f) && is_visible) |
1113 { | 1114 { |
1114 FRAME_VISIBLE_P (f) = 1; | 1115 FRAME_VISIBLE_P (f) = is_visible; |
1115 /* This improves the double flicker when uniconifying a frame | 1116 /* This improves the double flicker when uniconifying a frame |
1116 some. A lot of it is not showing a buffer which has changed | 1117 some. A lot of it is not showing a buffer which has changed |
1117 while the frame was iconified. To fix it further requires | 1118 while the frame was iconified. To fix it further requires |
1118 the good 'ol double redisplay structure. */ | 1119 the good 'ol double redisplay structure. */ |
1119 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); | 1120 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); |
1126 { | 1127 { |
1127 FRAME_VISIBLE_P (f) = 0; | 1128 FRAME_VISIBLE_P (f) = 0; |
1128 va_run_hook_with_args (Qunmap_frame_hook, 1, frame); | 1129 va_run_hook_with_args (Qunmap_frame_hook, 1, frame); |
1129 #ifdef EPOCH | 1130 #ifdef EPOCH |
1130 dispatch_epoch_event (f, event, Qx_unmap); | 1131 dispatch_epoch_event (f, event, Qx_unmap); |
1132 #endif | |
1133 } | |
1134 else if (FRAME_VISIBLE_P (f) * is_visible < 0) | |
1135 { | |
1136 FRAME_VISIBLE_P(f) = - FRAME_VISIBLE_P(f); | |
1137 if (FRAME_REPAINT_P(f)) | |
1138 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); | |
1139 va_run_hook_with_args (Qmap_frame_hook, 1, frame); | |
1140 #ifdef EPOCH | |
1141 dispatch_epoch_event (f, event, Qx_map); | |
1131 #endif | 1142 #endif |
1132 } | 1143 } |
1133 } | 1144 } |
1134 | 1145 |
1135 static void | 1146 static void |
1350 /* Nope. We must at least trigger a redisplay here. | 1361 /* Nope. We must at least trigger a redisplay here. |
1351 Since this case seems similar to MapNotify, I've | 1362 Since this case seems similar to MapNotify, I've |
1352 factored out some code to change_frame_visibility(). | 1363 factored out some code to change_frame_visibility(). |
1353 This triggers the necessary redisplay and runs | 1364 This triggers the necessary redisplay and runs |
1354 (un)map-frame-hook. - dkindred@cs.cmu.edu */ | 1365 (un)map-frame-hook. - dkindred@cs.cmu.edu */ |
1366 /* Changed it again to support the tristate visibility flag */ | |
1355 change_frame_visibility (f, (event->xvisibility.state | 1367 change_frame_visibility (f, (event->xvisibility.state |
1356 != VisibilityFullyObscured)); | 1368 != VisibilityFullyObscured) ? 1 : -1); |
1357 } | 1369 } |
1358 break; | 1370 break; |
1359 | 1371 |
1360 case ConfigureNotify: | 1372 case ConfigureNotify: |
1361 #ifdef HAVE_XIM | 1373 #ifdef HAVE_XIM |