Stephen Dennison <stephe...@gmail.com> [2018-07-17 09:49:39 -0400]: > On Tue, Jul 17, 2018 at 9:40 AM, Stephen Dennison <stephe...@gmail.com> wrote: > >> OK, I just tried it with an empty config too, and came across something new > >> that I'd never noticed before, which may be a clue: The problem seems to be > >> related to whether or not the "hide xv windows" checkbox is selected before > > I had not selected that previously. This seems to be key. > > > >> doing the grab. When it is not selected, the problem did not occur. When it > >> is selected, it occurred every time. > > I get that to. > > > >> > >> Here's the recipe I followed 4-5 times in a row in bare fvwm, talking to > >> FvwmConsole manually, to get it to happen: > >> > >> 1. start xv > >> 2. In xv, do a grab (^G) and click the "hide xv windows" checkbox. > >> 3. Do the screengrab using button 1 (window) or button 2 (swept > >> region) > >> 4. Iconify # Goes to position A > >> 5. Move # Manually move icon to position B > >> 6. Iconify # De-iconify > >> 7. Do another grab exactly as done in step 2 > >> 8. Iconify # Goes to position A > > > > This recipe does, indeed, recreate the problem. When that box is > > checked, it iconifies to the default position instead of where it was > > last iconified. The window is unmapped. I've never programmed this > > sort of thing, maybe someone else can step forward and describe what > > the correct behavior is here, but in xvgrab.c, line 64, it invokes > > XUnmapWindow, where I imagine it should instead be using > > XIconifyWindow? Maybe FVWM considers unmapped windows to be > > forgettable? I don't know how to get the current display number, > > otherwise I imagine you could just replace this unmap with a call to > > iconify it... > > > > (Note: source from here: > > ftp://ftp.mowgli.ch/pub/debian/pool/unofficial/x/xv/xv_3.10a.orig.tar.gz) > > > >> Maybe the act of "hiding the xv windows" also somehow whispers in fvwm's > >> ear > >> to discard the prior icon position? Just guessing out loud... > > I'm not qualified to even guess. Maybe an fvwm dev can chime in, as > > I'm over my head. > > Apparently if I had spent 30 seconds more at the googles I would have > come to this solution, replace the line I mention above with this: > > if (mainW && dispMode==RMB_WINDOW) XIconifyWindow(theDisp, mainW, > DefaultScreen(theDisp)); > > And then the app behaves. But keep in mind that the second dialog > that pops up is a new window, so you will want to iconify that and > move it around, then uniconify it to see that it really did remember > the new position. Then successive grabs still remember the previous > icon location. > > So, in conclusion, XV shouldn't be unmapping the window but asking to > be iconified. But I still don't know the wider ramifications of > asking to be unmapped. >
OK, thanks for your time and effot on this Stephen, much appreciated. I've been swamped since your post above, haven't had a chance to even think about it or try what you suggested (or even fully understand it.) But will do so eventually, and report what I find to the list, in case it may be useful to other xv-ers.