summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-04-21 22:03:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-04-21 22:03:01 (GMT)
commit00604f72c60af9ed0748c955048a446f7e5f7b9c (patch)
tree5deeaa223aed9f5fa42e43c83865f4287756eab3 /generic/tkListbox.c
parentfa289415c7aaacc173ab97665af201a54eae611a (diff)
downloadtk-00604f72c60af9ed0748c955048a446f7e5f7b9c.zip
tk-00604f72c60af9ed0748c955048a446f7e5f7b9c.tar.gz
tk-00604f72c60af9ed0748c955048a446f7e5f7b9c.tar.bz2
Fixed [b362182e45] - Generation of virtual events through Tk_HandleEvent is unsafe
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index c7effdd..b059727 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -3223,16 +3223,7 @@ static void
GenerateListboxSelectEvent(
Listbox *listPtr) /* Information about widget. */
{
- union {XEvent general; XVirtualEvent virtual;} event;
-
- memset(&event, 0, sizeof(event));
- event.general.xany.type = VirtualEvent;
- event.general.xany.serial = NextRequest(Tk_Display(listPtr->tkwin));
- event.general.xany.send_event = False;
- event.general.xany.window = Tk_WindowId(listPtr->tkwin);
- event.general.xany.display = Tk_Display(listPtr->tkwin);
- event.virtual.name = Tk_GetUid("ListboxSelect");
- Tk_HandleEvent(&event.general);
+ TkSendVirtualEvent(listPtr->tkwin, "ListboxSelect", NULL);
}
/*