summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-05-01 20:03:04 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-05-01 20:03:04 (GMT)
commit09fba1aae3aed0ba4d73890c19fe4c867fce8f82 (patch)
tree1b64ab21b1403ee5f4037e73ab310526762fe2f6 /generic/tkText.c
parenta49d18f50fd597f7b77eae71f3df70469136f839 (diff)
parentede13558f13645c01b9dff12f05b15d6e0435995 (diff)
downloadtk-09fba1aae3aed0ba4d73890c19fe4c867fce8f82.zip
tk-09fba1aae3aed0ba4d73890c19fe4c867fce8f82.tar.gz
tk-09fba1aae3aed0ba4d73890c19fe4c867fce8f82.tar.bz2
Merged core-8-6-branchtip_446_undodepth
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 3114835..d611323 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -3554,16 +3554,7 @@ TkTextSelectionEvent(
* event generate $textWidget <<Selection>>
*/
- union {XEvent general; XVirtualEvent virtual;} event;
-
- memset(&event, 0, sizeof(event));
- event.general.xany.type = VirtualEvent;
- event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.general.xany.send_event = False;
- event.general.xany.window = Tk_WindowId(textPtr->tkwin);
- event.general.xany.display = Tk_Display(textPtr->tkwin);
- event.virtual.name = Tk_GetUid("Selection");
- Tk_HandleEvent(&event.general);
+ TkSendVirtualEvent(textPtr->tkwin, "Selection", NULL);
}
/*
@@ -5217,7 +5208,10 @@ TextEditCmd(
*/
if ((!oldModified) != (!setModified)) {
- GenerateModifiedEvent(textPtr);
+ for (textPtr = textPtr->sharedTextPtr->peers; textPtr != NULL;
+ textPtr = textPtr->next) {
+ GenerateModifiedEvent(textPtr);
+ }
}
break;
case EDIT_REDO:
@@ -5389,21 +5383,8 @@ static void
GenerateModifiedEvent(
TkText *textPtr) /* Information about text widget. */
{
- union {
- XEvent general;
- XVirtualEvent virtual;
- } event;
-
Tk_MakeWindowExist(textPtr->tkwin);
-
- memset(&event, 0, sizeof(event));
- event.general.xany.type = VirtualEvent;
- event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.general.xany.send_event = False;
- event.general.xany.window = Tk_WindowId(textPtr->tkwin);
- event.general.xany.display = Tk_Display(textPtr->tkwin);
- event.virtual.name = Tk_GetUid("Modified");
- Tk_HandleEvent(&event.general);
+ TkSendVirtualEvent(textPtr->tkwin, "Modified", NULL);
}
/*