Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/event-Xt.c Mon Aug 13 08:51:58 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 08:52:29 2007 +0200 @@ -992,7 +992,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) { @@ -1002,7 +1003,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 @@ -1021,6 +1022,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 @@ -1243,8 +1254,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;