Wouldn't moving by the shadow skin first necessitate it being the top-most clickable element? That is, if one wanted to just grab the skin arbitrarily. If the main skin had interactive buttons then the shadow skin would need to only appear around the edges of the skin (and ideally not be interactable with the mouse at all).I don't think you'd need to bother with the Z order too much, just simply move the shadow skin first and then "zero move" the main skin to keep it focused and "in front" of the shadow skin.
Just to clarify (so I know we're talking about the same thing), part of the problem is when two skins overlap and the user clicks on one or the other and it's then raised above the other skin, despite both being ostensibly on the same 'main' Z position (ie: both could be on the 'Normal' or 'Topmost' position but Rainmeter still allows for dynamic overlap/Z-index within that, depending on which skin was last focused).
For the dual skin idea to work it would have to have insight into that dynamic Z-index, which IIRC last I searched wasn't possible to detect. Otherwise what would occur when a skin overlapped would be the shadow skin would be left in its original Z-index and the main skin would lose its apparent shadow on the part that intersects/overlaps the other skin (also for the sake of example, assuming no skin moves, only static clicks to focus either skin).
That said the scenario where non-overlapping shadows is actually very beneficial is when skins are intended to be snapped side-by-side, since one expects that the shadows would be the bottom-most z-index compared to the skins else either skin shadow would overlap the other skin (if large enough). This would get tricky to determine snapped positions vs non-snapped overlaps. It'd still need insight into z-index though since otherwise if one clicked a skin above say a non-Rainmeter window it would raise the main skin but not its shadow.
This bounding box aspect was just a separate consideration to the doubled margin part of the OP (since any narrowed margins means less room for such effects). Basically if someone wants to snap two skins together, while having peripheral effects like shadows extend beyond where they'd like the snap margins to be, it's impossible normally since Rainmeter treats any part of the skin that has a meter at the edges part of the bounding box for snapping.No need to complicate it though, this is perfectly / easily doable using just the main skin, you only need to detect if any of the coordinates of the skin is either the lowest or the highest in the skin arrangement (i.e. if it's at the edges of the arrangement), and correspondingly double those margins, like SilverAzide mentioned.
The idea I posted above is just a workaround for having separate snappable area vs the visual extremities of the skin. See the illustration below, picturing two skins where you want them to snap together at the shown distance. The red lines represent the actual skin bounds that Rainmeter would snap to ordinarily if the shadows were part of each blue skin shown (rather than a separate skin).
Statistics: Posted by Crest — Yesterday, 2:50 pm