comparison src/event-Xt.c @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 1917ad0d78d7
children 56c54cf7c5b6
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
990 a frame is destroyed. */ 990 a frame is destroyed. */
991 return; 991 return;
992 handle_focus_event_1 (f, event->type == FocusIn); 992 handle_focus_event_1 (f, event->type == FocusIn);
993 } 993 }
994 994
995 /* both MapNotify and VisibilityNotify can cause this */ 995 /* both MapNotify and VisibilityNotify can cause this
996 JV is_visible has the same semantics as f->visible*/
996 static void 997 static void
997 change_frame_visibility (struct frame *f, int is_visible) 998 change_frame_visibility (struct frame *f, int is_visible)
998 { 999 {
999 Lisp_Object frame = Qnil; 1000 Lisp_Object frame = Qnil;
1000 1001
1001 XSETFRAME (frame, f); 1002 XSETFRAME (frame, f);
1002 1003
1003 if (!FRAME_VISIBLE_P (f) && is_visible) 1004 if (!FRAME_VISIBLE_P (f) && is_visible)
1004 { 1005 {
1005 FRAME_VISIBLE_P (f) = 1; 1006 FRAME_VISIBLE_P (f) = is_visible;
1006 /* This improves the double flicker when uniconifying a frame 1007 /* This improves the double flicker when uniconifying a frame
1007 some. A lot of it is not showing a buffer which has changed 1008 some. A lot of it is not showing a buffer which has changed
1008 while the frame was iconified. To fix it further requires 1009 while the frame was iconified. To fix it further requires
1009 the good 'ol double redisplay structure. */ 1010 the good 'ol double redisplay structure. */
1010 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); 1011 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f);
1017 { 1018 {
1018 FRAME_VISIBLE_P (f) = 0; 1019 FRAME_VISIBLE_P (f) = 0;
1019 va_run_hook_with_args (Qunmap_frame_hook, 1, frame); 1020 va_run_hook_with_args (Qunmap_frame_hook, 1, frame);
1020 #ifdef EPOCH 1021 #ifdef EPOCH
1021 dispatch_epoch_event (f, event, Qx_unmap); 1022 dispatch_epoch_event (f, event, Qx_unmap);
1023 #endif
1024 }
1025 else if (FRAME_VISIBLE_P (f) * is_visible < 0)
1026 {
1027 FRAME_VISIBLE_P(f) = - FRAME_VISIBLE_P(f);
1028 if (FRAME_REPAINT_P(f))
1029 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f);
1030 va_run_hook_with_args (Qmap_frame_hook, 1, frame);
1031 #ifdef EPOCH
1032 dispatch_epoch_event (f, event, Qx_map);
1022 #endif 1033 #endif
1023 } 1034 }
1024 } 1035 }
1025 1036
1026 static void 1037 static void
1241 /* Nope. We must at least trigger a redisplay here. 1252 /* Nope. We must at least trigger a redisplay here.
1242 Since this case seems similar to MapNotify, I've 1253 Since this case seems similar to MapNotify, I've
1243 factored out some code to change_frame_visibility(). 1254 factored out some code to change_frame_visibility().
1244 This triggers the necessary redisplay and runs 1255 This triggers the necessary redisplay and runs
1245 (un)map-frame-hook. - dkindred@cs.cmu.edu */ 1256 (un)map-frame-hook. - dkindred@cs.cmu.edu */
1257 /* Changed it again to support the tristate visibility flag */
1246 change_frame_visibility (f, (event->xvisibility.state 1258 change_frame_visibility (f, (event->xvisibility.state
1247 != VisibilityFullyObscured)); 1259 != VisibilityFullyObscured) ? 1 : -1);
1248 } 1260 }
1249 break; 1261 break;
1250 1262
1251 case ConfigureNotify: 1263 case ConfigureNotify:
1252 #ifdef HAVE_XIM 1264 #ifdef HAVE_XIM