Mercurial > hg > xemacs-beta
diff src/EmacsManager.c @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | ac2d302a0011 |
children | e121b013d1f0 |
line wrap: on
line diff
--- a/src/EmacsManager.c Mon Aug 13 08:48:43 2007 +0200 +++ b/src/EmacsManager.c Mon Aug 13 08:49:20 2007 +0200 @@ -150,14 +150,14 @@ int mask = request->request_mode & (CWWidth | CWHeight); struc.request_mode = mask; - struc.proposed_width = request->width; - struc.proposed_height = request->height; + if (mask & CWWidth) struc.proposed_width = request->width; + if (mask & CWHeight) struc.proposed_height = request->height; XtCallCallbackList (w, emw->emacs_manager.query_geometry_callback, &struc); reply->request_mode = CWWidth | CWHeight; - reply->width = struc.proposed_width; + reply->width = struc.proposed_width; reply->height = struc.proposed_height; - if (((mask & CWWidth) && (request->width != reply->width)) - || ((mask & CWHeight) && (request->height != reply->height))) + if (((mask & CWWidth) && (request->width != reply->width)) || + ((mask & CWHeight) && (request->height != reply->height))) return XtGeometryAlmost; return XtGeometryYes; } @@ -168,7 +168,7 @@ EmacsManagerWidget emw = (EmacsManagerWidget) w; EmacsManagerResizeStruct struc; - struc.width = w->core.width; + struc.width = w->core.width; struc.height = w->core.height; XtCallCallbackList (w, emw->emacs_manager.resize_callback, &struc); } @@ -232,9 +232,6 @@ void EmacsManagerChangeSize (Widget w, Dimension width, Dimension height) { - Dimension realwidth, realheight; - XtGeometryResult res; - if (width == 0) width = w->core.width; if (height == 0) @@ -242,13 +239,9 @@ /* do nothing if we're already that size */ if (w->core.width != width || w->core.height != height) - { - res = XtMakeResizeRequest (w, width, height, &realwidth, &realheight); - if (res == XtGeometryAlmost) - XtMakeResizeRequest (w, realwidth, realheight, NULL, NULL); - w->core.width = realwidth; - w->core.height = realheight; - } + if (XtMakeResizeRequest (w, width, height, &w->core.width, &w->core.height) + == XtGeometryAlmost) + XtMakeResizeRequest (w, w->core.width, w->core.height, NULL, NULL); Resize (w); }