aboutsummaryrefslogtreecommitdiff
path: root/generic/tkZinc.c
diff options
context:
space:
mode:
authorlecoanet2007-04-23 13:06:18 +0000
committerlecoanet2007-04-23 13:06:18 +0000
commit7c5d00a56e62284cd53a21b45e7cff0e570903d3 (patch)
tree5cd2092ae7a2ebd2341e0cf93f5e8f6da1880f59 /generic/tkZinc.c
parentb027f06702b6716133c7b2ff89d345dda3189d2c (diff)
downloadtkzinc-7c5d00a56e62284cd53a21b45e7cff0e570903d3.zip
tkzinc-7c5d00a56e62284cd53a21b45e7cff0e570903d3.tar.gz
tkzinc-7c5d00a56e62284cd53a21b45e7cff0e570903d3.tar.bz2
tkzinc-7c5d00a56e62284cd53a21b45e7cff0e570903d3.tar.xz
Fix the text cursor not displayed when the text is empty
Diffstat (limited to 'generic/tkZinc.c')
-rw-r--r--generic/tkZinc.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index e7d6851..df3aeb6 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -336,7 +336,7 @@ static Tk_ConfigSpec config_specs[] = {
{TK_CONFIG_BOOLEAN, "-confine", "confine", "Confine",
"1", Tk_Offset(ZnWInfo, confine), 0, NULL},
{TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
- "", Tk_Offset(ZnWInfo, cursor), TK_CONFIG_NULL_OK, NULL},
+ "arrow", Tk_Offset(ZnWInfo, cursor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_FONT, "-font", "font", "Font",
"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*",
Tk_Offset(ZnWInfo, font), 0, NULL},
@@ -7277,16 +7277,13 @@ Blink(ClientData client_data)
}
if (wi->text_info.cursor_on) {
wi->text_info.cursor_on = 0;
- wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_off_time,
- Blink, client_data);
+ wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_off_time, Blink, client_data);
}
else {
wi->text_info.cursor_on = 1;
- wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_on_time,
- Blink, client_data);
+ wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_on_time, Blink, client_data);
}
- if ((wi->focus_item != ZN_NO_ITEM) &&
- (wi->focus_item->class->Cursor != NULL)) {
+ if ((wi->focus_item != ZN_NO_ITEM) && (wi->focus_item->class->Cursor != NULL)) {
ZnITEM.Invalidate(wi->focus_item, ZN_DRAW_FLAG);
}
}
@@ -7300,8 +7297,7 @@ Focus(ZnWInfo *wi,
SET(wi->flags, ZN_GOT_FOCUS);
wi->text_info.cursor_on = 1;
if (wi->insert_off_time != 0) {
- wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_off_time,
- Blink, (ClientData) wi);
+ wi->blink_handler = Tcl_CreateTimerHandler(wi->insert_off_time, Blink, (ClientData) wi);
}
}
else {