Mercurial > hg > xemacs-beta
diff src/frame-x.c @ 30:ec9a17fef872 r19-15b98
Import from CVS: tag r19-15b98
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:52:29 +0200 |
parents | 859a2309aef8 |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/src/frame-x.c Mon Aug 13 08:51:58 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 08:52:29 2007 +0200 @@ -2184,7 +2184,7 @@ unsigned int flags; Display *display = DEVICE_X_DISPLAY (XDEVICE (f->device)); - if (f->visible || force) + if (FRAME_VISIBLE_P(f) || force) { emacs_window = XtWindow (FRAME_X_SHELL_WIDGET (f)); /* first raises all the dialog boxes, then put emacs just below the @@ -2223,7 +2223,7 @@ XWindowChanges xwc; unsigned int flags; - if (f->visible) + if (FRAME_VISIBLE_P(f)) { xwc.stack_mode = Below; flags = CWStackMode; @@ -2239,7 +2239,7 @@ { Display *display = DEVICE_X_DISPLAY (XDEVICE (f->device)); - if (!f->visible) + if (!FRAME_VISIBLE_P(f)) XMapRaised (display, XtWindow (FRAME_X_SHELL_WIDGET (f))); else x_raise_frame_1 (f, 0); @@ -2251,7 +2251,7 @@ { Display *display = DEVICE_X_DISPLAY (XDEVICE (f->device)); - if (!f->visible) + if (!FRAME_VISIBLE_P(f)) return; if (!XWithdrawWindow (display, @@ -2267,15 +2267,40 @@ XWindowAttributes xwa; int result; + /* JV: + This is bad, very bad :-( + It is not compatible with our tristate visible and + it should never ever change the visibility for us, this leads to + the frame-freeze problem under fvwm because with the pager + + Mappedness != Viewability != Visibility != Emacs f->visible + + This first unequalness is the reason for the frame freezing problem + under fvwm (it happens when the frame is another fvwm-page) + + The second unequalness happen when it is on the same fvwm-page + but in an invisible part of the visible screen. + + For now we just return the XEmacs internal value --- which might not be up + to date. Is that a problem? ---. Otherwise we should + use async visibility like in standard Emacs. + */ + +#if 0 if (!XGetWindowAttributes (display, XtWindow (FRAME_X_SHELL_WIDGET (f)), &xwa)) result = 0; else result = xwa.map_state == IsViewable; + /* In this implementation it should at least be != IsUnmapped + JV */ f->visible = result; return result; +#endif + + return f->visible; } static int @@ -2304,6 +2329,7 @@ { XWindowAttributes xwa; Widget shell_widget; + int viewable; assert (FRAME_X_P (f)); @@ -2327,9 +2353,15 @@ if (XGetWindowAttributes (XtDisplay (shell_widget), XtWindow (shell_widget), &xwa)) - f->visible = xwa.map_state == IsViewable; + /* JV: it is bad to change the visibility like this, so we don't for the + moment, at least change_frame_visibility should be called + Note also that under fvwm a frame can me Viewable (and thus Mapped) + but still X-invisible + f->visible = xwa.map_state == IsViewable; */ + viewable = xwa.map_state == IsViewable; + - if (f->visible) + if (viewable) { Window focus; int revert_to;