--parent-win causes "segmentation fault" to appear on stdout (NOT stderr) and yad fails exiting 139
Title states the issue. I created a simple example in lxterminal to illustrate it:
`$ wmctrl -l|grep "testing_yad_in_lxterminal$" 0x00600d6c 0 1804 testing_yad_in_lxterminal
$ G_MESSAGES_DEBUG=all yad --title="Attached YAD" --text="This window is attached to a terminal" --width=200 --height=100 --parent-win="0x00600d6c" 2>/dev/null Segmentation fault
$ G_MESSAGES_DEBUG=all yad --title="Attached YAD" --text="This window is attached to a terminal" --width=200 --height=100 --parent-win="6294892" 2>/dev/null Segmentation fault
$ yad --version 2>/dev/null 0.38.2 (GTK+ 3.22.30)
$ ` I piped 2 to /dev/null for clarity since all that appears in 2 is GTK warnings about deprecated syntax in the theme that are now elicited by EVERY GUI program I run in a terminal no matter what theme I use. Not even Clear Looks, which I assume is kept up to date since it is popular, avoids this. I verified this by also piping 2 to a file and inspecting it both by eye and just to be belt-&-suspenders sure, by cat and grep -v on the file to verify I hadn't missed anything. I find it suprising that "segmentation fault" appears on stdout instead of stderr. This only happens when the --parent-win option is used. The second version of the window ID I got by converting the hex that wmctrl reports to a pure hindu-arabic form with a utility made for the purpose. ADDED: In the "code" above I had to insert additional line feeds in the terminal output before each $ prompt to prevent it from collapsing it all into a huge one line WOT-blob. Is the <> button not the right way to do this?
This is under a plain Openbox environment with no further DE, built from the mini.iso of Ubuntu 18.04. Contrary to popular belief, 18.04 is still under limited support for registered users, a sort of extended extended support for us diehards.
Is this, in fact, a bug, or have I done it wrong? Or do the gods of electrons just hate me?
Apparently the decision was made to remove the option rather than fix it. Two minor versions later, in 0.40.0 (GTK+ 3.24.41) on Unbuntu 24.04, I find no trace of it. It doesn't complain of a bad option (that used to be configurable and maybe still is) - it just ignores it. I wonder if any fork retains this option in a working form.
(I'm not the author) I did some code archaeology about this feature. It was discontinued in February 2017 before version 0.39. I couldn't find any mention that the feature was broken at the time, nor an explanation why it was discontinued. However, a comment in the then-code leads me to believe it wasn't deemed that useful a feature. I'm curious why you find it useful, which practical application of yours needs this feature?
Since I never got it to work, it is more a matter of having expected it to be useful rather than finding it useful, but I used yad to make a toolbar that, when Firefox is running, I want to ride in firefox at a specific location. In practice, I have now solved the problem with another approach, made possible because I almost always use Firefox with the same geometry. I was hoping to twin it into 2 versions with a Firefox-specific one that started with Firefox, but, for now at least, I just run a script that monitors the active window and moves the toolbar to different positions depending on what's focused. Resource-wise, I suspect this is similar in efficiency to the approach I was aiming at before I gave up on it, though it uses a bit more screen real estate, as 2 of the, presently, 7 buttons are Firefox-specific and don't need to be there all the time.
If not many people used the option, I suspect that is either because they gave up trying to figure it out, or they couldn't get it to work. Being so close to the subject, I suspect you may underestimate the number of users who use, and understand yad in a very limited way, maybe never even using anything but the default buttons and a --text message. The huge number of options probably intimidates a lot of people when they open the man page. I used yad that way a long time before figuring out the neat stuff I could do with --scale. And --notebook is still a mystery I haven't plumbed but suspect I'd find useful if I did. But, the way things are going, pretty soon I'll be able to tell an AI to write me a yad --notebook to do thus and so, and it will. Hell, maybe I could even ask it to replace the --parent-win option and give me a deb. We live in interesting times. I hope we survive them.