MHHP,
Thanks for the information.
Yes, I believe Ghost Dog's problem is similar to yours from 2009.
The problem that you solved for yourself in 2009 (or before) was solved for official Puppies that October when Barry included in Puppy 4.3.1 a fix from shinobar that shinobar had already included in one of his Puppies (possibly Puppy v4.20p1JP).
MinHundHettePerro wrote:It was a long time ago now, but the problem involved, iirc, the grid-step in Rox and pup_event's "screen-height minus whatever bottom-clearance not being equal to top-clearance plus a multiple of vertical grid-steps - when rounded off to Rox's grid step".
Yes, that's a good description of the problem (although I don't think there was any "top-clearance" involved). In modern Puppy terms, the script placed the bottom row of icons at a Y coordinate equal to screen height minus $ICON_PLACE_EDGE_GAP. Back then what is now $ICON_PLACE_EDGE_GAP was hard-coded in the script at 64 (which is still its default value today). So 600 - 64 = 536, which is not an exact multiple of 16 or 32, the "Medium" and "Coarse" "pinboard_grid_step" values. The script would think it placed the icons at 536, but ROX-Filer would snap them to the grid at 544, which was the closest grid line at either of those two settings.
(There was a little bit of a fudge factor built into pup_event_frontend_d. It could often find an existing icon even if the coordinates were close but not exactly the same. It did this by ignoring the least significant digit when comparing the values. So an icon with a coordinate of 320 could match when looking for a coordinate with the value of 328, since it actually just compares 32 to 32. But in this case, that fudge factor wasn't good enough, since it compared 54 to 53.)
MinHundHettePerro wrote:Puppy's solution involved, iirc, setting the grid step in Rox to fine, i.e. 2, ......
Right. That would work for any even-numbered screen height. Also, a grid step of 4 or 8 would have worked for a screen height of 600 (and for some, but not all, of the other screen heights that gave trouble with steps of 16 or 32).
In addition to 600, other existing screen heights that might have shown the problem when ROX-Filer's "pinboard_grid_step" was set to "Medium" (16) would be 200, 854, 900, 1050, and 1080. All of those screen heights might also have shown the problem with a "pinboard_grid_step" of "Coarse" (32), and additionally these heights might have shown the problem: 240, 720, and 1200.
The fix from shinobar worked fine when placing drive icons along the bottom of the desktop, and that was all that was needed at the time, since the bottom of the desktop was the only place that Puppy placed them in Puppy 4.3.1 and before. Then in December of 2009, Barry added the ability for the user to place them along the other edges of the desktop.
That change opened the door to a similar problem if a user chose to have the drive icons arranged vertically along the right edge of the desktop. Again, using the default values (now in /etc/eventmanager), the problem would only appear with certain screen resolutions. For instance, a resolution of 1366x768, when used with the default $ICON_PLACE_EDGE_GAP of 64, would cause the X coordinate for the first drive icon to be 1366 - 64 = 1302. If the user set the ROX-Filer icon grid steps to "Medium" (16) or "Coarse" (32), ROX would not place the icon at X coordinate 1302 since that is not a multiple of 16 or 32, but would place it at 1296 (if "Medium" grid) or 1312 (if "Coarse") grid. This is currently only theory on my part, since I don't have any 1366x768 hardware to test it on.
If, as I suspect, the width of the resolution that exhibits a problem for Ghost Dog is 1366 or one of the other widths that I mentioned in my previous post, then this is likely the reason why.
One answer would be to calculate the X coordinate for drive icons along the right side using the same method that shinobar used to calculate the Y coordinate for drive icons along the bottom.
Another answer is the one that Karl devised and used in the code he posted in this thread on May-02 (
http://www.murga-linux.com/puppy/viewto ... 461#701461). Rather than use a calculation to predict the value that ROX will use, his code looks at the PuppyPin file to see what value ROX actually
did use.
Of course, yet another answer would be to use the method that you used in 2009, and set the X coordinate initially to an appropriate multiple of ROX-Filer's "pinboard_grid_step" based upon the screen-width and $ICON_PLACE_EDGE_GAP, rather than first setting it
exactly to screen-width minus $ICON_PLACE_EDGE_GAP and then trying to predict where ROX
will move it to, or looking to see where ROX
did move it to.