GNOME Bugzilla – Bug 579027
onwindowcreate expects a _NON_ stripped window title
Last modified: 2009-05-19 12:24:47 UTC
After reading the ldtp-tutorial I though that I have to use a stripped version of the window titles _everywhere_. So I used it in onwindowcreate function and relaized that it just doesn't work... After debugging ldtp I noticed that in report_window_event the title of the window is compared against the registered one as is, and not stripped: ldtp.c:118 if ((cctxt = is_window_reg_for_events (title))) { If it's not a bug pls write it in the documentation of onwindowcreate. It will save some hours of looking weird :)
sure, thanks, will fix the document and this function too :)
Fixed in git, request to verify the same. Thanks for the bug report.
Checked only the code (have to work on another project now), but it seems to be ok. Verified, thx.
Created attachment 133847 [details] [review] patch Unfortunately the fix which is mentioned in comment 2 causes double free, so please consider this patch to solve that problem.
It seems that Szilard is right. It causes a double free, and also the original problem was that it did not use the stripped version of the title, now although it uses the stripped version, one has to prefix it with dlg/frm/etc... It would be good if it worked with and without the prefix too.
Thanks for the patch. Committed to git.
I agree with Balazs (comment 5). The onwindowcreate function should work either with or without the dlg/frm/... prefixes, so the bug should be REOPENED.