Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/event-Xt.c Mon Aug 13 09:17:27 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 09:18:39 2007 +0200 @@ -1101,7 +1101,8 @@ handle_focus_event_1 (f, event->type == FocusIn); } -/* both MapNotify and VisibilityNotify can cause this */ +/* both MapNotify and VisibilityNotify can cause this + JV is_visible has the same semantics as f->visible*/ static void change_frame_visibility (struct frame *f, int is_visible) { @@ -1111,7 +1112,7 @@ if (!FRAME_VISIBLE_P (f) && is_visible) { - FRAME_VISIBLE_P (f) = 1; + FRAME_VISIBLE_P (f) = is_visible; /* This improves the double flicker when uniconifying a frame some. A lot of it is not showing a buffer which has changed while the frame was iconified. To fix it further requires @@ -1130,6 +1131,16 @@ dispatch_epoch_event (f, event, Qx_unmap); #endif } + else if (FRAME_VISIBLE_P (f) * is_visible < 0) + { + FRAME_VISIBLE_P(f) = - FRAME_VISIBLE_P(f); + if (FRAME_REPAINT_P(f)) + MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); + va_run_hook_with_args (Qmap_frame_hook, 1, frame); +#ifdef EPOCH + dispatch_epoch_event (f, event, Qx_map); +#endif + } } static void @@ -1352,8 +1363,9 @@ factored out some code to change_frame_visibility(). This triggers the necessary redisplay and runs (un)map-frame-hook. - dkindred@cs.cmu.edu */ + /* Changed it again to support the tristate visibility flag */ change_frame_visibility (f, (event->xvisibility.state - != VisibilityFullyObscured)); + != VisibilityFullyObscured) ? 1 : -1); } break;