After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579027 - onwindowcreate expects a _NON_ stripped window title
onwindowcreate expects a _NON_ stripped window title
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp
1.5.0
Other Linux
: Normal normal
: ---
Assigned To: LDTP maintainers
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2009-04-15 09:24 UTC by Tirpak Balazs
Modified: 2009-05-19 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (939 bytes, patch)
2009-05-03 07:56 UTC, Szilárd Pfeiffer
committed Details | Review

Description Tirpak Balazs 2009-04-15 09:24:20 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 :)
Comment 1 Nagappan Alagappan 2009-04-17 06:09:26 UTC
sure, thanks, will fix the document and this function too :)
Comment 2 Nagappan Alagappan 2009-04-25 22:52:22 UTC
Fixed in git, request to verify the same. Thanks for the bug report.
Comment 3 Tirpak Balazs 2009-04-27 08:07:36 UTC
Checked only the code (have to work on another project now), but it seems to be ok.

Verified, thx.
Comment 4 Szilárd Pfeiffer 2009-05-03 07:56:14 UTC
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.
Comment 5 Tirpak Balazs 2009-05-07 16:03:00 UTC
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.
Comment 6 Nagappan Alagappan 2009-05-10 07:02:49 UTC
Thanks for the patch. Committed to git.
Comment 7 Szilárd Pfeiffer 2009-05-19 12:24:47 UTC
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.