On 20/06/12 22:12, Carlos R. Mafra wrote:
> On Wed, 20 Jun 2012 at 21:17:15 +0200, Rodolfo kix Garcia wrote:
>> On 20/06/12 16:01, Carlos R. Mafra wrote:
>>
>>> On Wed, 20 Jun 2012 at 14:54:05 +0100, Carlos R. Mafra wrote:
>>>
>>>> So I'd say the problem lies in the automatic start of applications
>>>> which have no appicon.
>>>>
>>>> I have three xterms which automatically start (through the Save Session)
>>>> and they all have no_appicon set. It seems that the space corresponding
>>>> to three appicons is in use, and if I start some other application
>>>> then its appicon is placed in a shifted position which is equivalent
>>>> to 3 appicons.
>>>>
>>>> And I bisected the problem to this commit.
>>>
>>> It doesn't matter if the automatically start or not. My xterms
>>> have no appicon. After I start one, the space which would be
>>> occupied by its icon is not used by other appicons.
>>>
>>> So if I start one xterm than another app (with appicon) and
>>> so forth, the icons of the application are placed 64 pixels
>>> apart.
>>>
>>>
>>
>>
>> I found the problem. The problem is that the wArrangeIcon function
>> checks if the icon exists. Now, the icon always exists, then is added
>> space for the appicon. The function now should check the flag:
>>
>> !wwin->user_flags.no_appicon
>>
>> instead "wwin->icon".
>
> No, the patch does not fix it. I will revert the patch which causes
> this in the first place.
Carlos,
if you want to revert the patch, do it, no problem. But IMO, here, the
patch solves the problem :-/
> It does not really make sense to do work if we know that no_appicon
> is set, it is a waste.
Now, the wApplicationCreate creates wapp and wapp->icon, always! Then,
the checks about "if (wwin->icon)" don't make sense.
If the icon is created always, we don't need check if exists, we don't
need create the icon or destroy,... the code is more easy, we need less
code, and IMO better.
Please, if you want revert the patch, perfect, but try to reproduce the
bug, and I will try to do it too. I can launch the applications, restart
wmaker,... and I don't have the hole. Your help is very appreciated.
If more people can help,...
>
>
>> kix@kentin:~/src/wmaker-crm/src$ git diff
>> diff --git a/src/actions.c b/src/actions.c
>> index 61be535..686350c 100644
>> --- a/src/actions.c
>> +++ b/src/actions.c
>> @@ -1787,7 +1787,10 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
>> wwin = wwin->prev;
>>
>> while (wwin) {
>> - if (wwin->icon && wwin->flags.miniaturized &&
>> !wwin->flags.hidden &&
>> + if (wwin->icon &&
>> + !wwin->user_flags.no_appicon &&
>> + wwin->flags.miniaturized &&
>> + !wwin->flags.hidden &&
>> (wwin->frame->workspace == scr->current_workspace ||
>> IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)) {
>>
>>
>> --
>> To unsubscribe, send mail to [email protected].
>
>
--
To unsubscribe, send mail to [email protected].