[Pkg-wmaker-devel] Bug#792214: Icons and screen border
Doug Torrance
dtorrance at piedmont.edu
Sun Jan 17 05:15:37 UTC 2016
On 01/16/2016 10:24 AM, Carlos R. Mafra wrote:
> On Wed, 13 Jan 2016 at 10:11:25 -0500, Doug Torrance wrote:
>> While investigating Debian bug #792214 [1], I noticed some peculiar
>> behavior.
>>
>> Suppose icons are positioned (using "Icon Positioning" in the "Icon
>> Preferences" tab of WPrefs) on the same side of the screen as the
>> dock.
>>
>> Suppose no icons are currently on the screen (aside from the
>> clip/dock). Open an application or minimize an existing
>> application. The icon will appear on the edge of the screen.
>>
>> However, move to a different workspace, or some other behavior that
>> causes Window Maker to rearrange the icons, and the icons will move
>> over to accommodate the dock, even if the dock is nowhere nearby.
>> This is due the following code in src/actions.c (in the
>> wArrangeIcons function):
>>
>> if (scr->dock) {
>> int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
>>
>> if (scr->dock->on_right_side)
>> area.x2 -= offset;
>> else
>> area.x1 += offset;
>> }
>>
>> It would be preferable, I think, if the behavior was consistent. I
>> see several options:
>>
>> * Always draw the icons on the edge of the screen (i.e., remove the
>> above code).
>> * Always leave room for the dock (i.e., put similar code in the
>> other places where icons are originally placed).
>> * Detect whether the icons would actually intersect with the dock
>> and choose one of the above options accordingly.
>
> This scenario you described looks too artificial. But from the
> options you mentioned the most logical seems to be the last, ie
> detect whether there will be an overlap and choose dynamically.
>
> The drawback might be an increased complexity in the code for
> something unlikely to be an issue in practice.
I've done a little more digging. Some code already exists that does
detect overlaps (the PlaceIcon function in placement.c), but for
individual icons and not a bunch at once. I'll play around with it and
submit a patch when I have something functional.
Doug
More information about the Pkg-wmaker-devel
mailing list