summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-08-19 13:48:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-08-19 13:48:39 (GMT)
commitbb85da92c96071f97d0ebdc6f7f029a171b0c682 (patch)
tree41d5454c4a28ff447c81aa025cc8df01156220c0 /generic
parentb7987c124821dc0e85b656bc216b70d14a9ba57c (diff)
parent4fea14bc381164ee07c8870a82cdc5a14953b57c (diff)
downloadtk-bb85da92c96071f97d0ebdc6f7f029a171b0c682.zip
tk-bb85da92c96071f97d0ebdc6f7f029a171b0c682.tar.gz
tk-bb85da92c96071f97d0ebdc6f7f029a171b0c682.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFont.c66
-rw-r--r--generic/tkTextDisp.c11
2 files changed, 43 insertions, 34 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index cbc4cf4..a955c35 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -600,40 +600,40 @@ Tk_FontObjCmd(
return result;
}
case FONT_CONFIGURE: {
- int result;
- const char *string;
- Tcl_Obj *objPtr;
- NamedFont *nfPtr;
- Tcl_HashEntry *namedHashPtr;
-
- if (objc < 3) {
- Tcl_WrongNumArgs(interp, 2, objv, "fontname ?-option value ...?");
- return TCL_ERROR;
- }
- string = Tcl_GetString(objv[2]);
- namedHashPtr = Tcl_FindHashEntry(&fiPtr->namedTable, string);
+ int result;
+ const char *string;
+ Tcl_Obj *objPtr;
+ NamedFont *nfPtr;
+ Tcl_HashEntry *namedHashPtr;
+
+ if (objc < 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "fontname ?-option value ...?");
+ return TCL_ERROR;
+ }
+ string = Tcl_GetString(objv[2]);
+ namedHashPtr = Tcl_FindHashEntry(&fiPtr->namedTable, string);
nfPtr = NULL; /* lint. */
- if (namedHashPtr != NULL) {
- nfPtr = Tcl_GetHashValue(namedHashPtr);
- }
- if ((namedHashPtr == NULL) || nfPtr->deletePending) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "named font \"%s\" doesn't exist", string));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "FONT", string, NULL);
- return TCL_ERROR;
- }
- if (objc == 3) {
- objPtr = NULL;
- } else if (objc == 4) {
- objPtr = objv[3];
- } else {
- result = ConfigAttributesObj(interp, tkwin, objc - 3, objv + 3,
- &nfPtr->fa);
- UpdateDependentFonts(fiPtr, tkwin, namedHashPtr);
- return result;
- }
- return GetAttributeInfoObj(interp, &nfPtr->fa, objPtr);
- }
+ if (namedHashPtr != NULL) {
+ nfPtr = Tcl_GetHashValue(namedHashPtr);
+ }
+ if ((namedHashPtr == NULL) || nfPtr->deletePending) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "named font \"%s\" doesn't exist", string));
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "FONT", string, NULL);
+ return TCL_ERROR;
+ }
+ if (objc == 3) {
+ objPtr = NULL;
+ } else if (objc == 4) {
+ objPtr = objv[3];
+ } else {
+ result = ConfigAttributesObj(interp, tkwin, objc - 3, objv + 3,
+ &nfPtr->fa);
+ UpdateDependentFonts(fiPtr, tkwin, namedHashPtr);
+ return result;
+ }
+ return GetAttributeInfoObj(interp, &nfPtr->fa, objPtr);
+ }
case FONT_CREATE: {
int skip = 3, i;
const char *name;
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index aebdcc6..8ceb3fa 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -3970,6 +3970,15 @@ DisplayText(
UpdateDisplayInfo(textPtr);
dInfoPtr->dLinesInvalidated = 0;
+#ifdef MAC_OSX_TK
+ /*
+ * Make sure that unmapped subwindows really have been unmapped.
+ * If the unmap request is pending as an idle request, the window
+ * can get redrawn on top of the widget.
+ */
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {}
+#endif
+
/*
* See if it's possible to bring some parts of the screen up-to-date by
* scrolling (copying from other parts of the screen). We have to be
@@ -4035,7 +4044,7 @@ DisplayText(
*/
if ((y + height) > dInfoPtr->maxY) {
- height = dInfoPtr->maxY -y;
+ height = dInfoPtr->maxY - y;
}
oldY = dlPtr->oldY;
if (y < dInfoPtr->y) {