On Mon, 19 Nov 2012, Carlos R. Mafra escribió:

> On Sun, 18 Nov 2012 at 23:44:45 +0100, Rodolfo García Peñas wrote:
> > On Sun, 18 Nov 2012, Carlos R. Mafra escribió:
> > 
> > > On Sun, 18 Nov 2012 at 23:07:48 +0100, Rodolfo García Peñas (kix) wrote:
> > > > From: "Rodolfo García Peñas (kix)" <[email protected]>
> > > > 
> > > > This patch removes the wIconDestroy and the window always has icon.
> > > > This patch doesn't create the icon at the window creation! so yet
> > > > WWindow icon could be null.
> > > > 
> > > > This patch also adds this bug when the window is removed:
> > > > 
> > > > wmaker(RemoveFromStackList(stacking.c:567)): \
> > > > warning: RemoveFromStackingList(): window not in list
> > > > 
> > > > Because the stacking is not updated correctly.
> > > 
> > > I'm sorry, but why should I apply a patch which says
> > > 
> > >   "This patch also adds this bug"
> > > 
> > > What's going on here?
> > 
> > Is not a bug, is a issue. See the patch 0006-stacking-warning-removed.patch
> 
> In that patch you simply removed the warning, and I couldn't understand
> your explanation there too. The warning seems to be legit since
> XDeleteContext() returns an error code XCNOENT.
> 
> By removing the warning one misses this knowledge.
> 
> One should avoid the warning by making the code pass the check instead
> of deleting it. And I couldn't see why you can remove it, the error
> is still there, it's not been addressed afaics.
> 
> You may well be right and your series may well do the right things,
> but given the difficult to understand explanations I feel unconfortable
> in applying patches 3,4 and 6.
> 
> I applied the other ones now.

Ok,

I will try to explain it.

Before these patches:

When minimize a window, an appicon is created, and the icon is added to the 
stacking list.
When you un-minimize the icon, the icon is destroyed and is removed from the 
stacking list.

After these patches:

1. When the application is created, the appicon (wwin->icon) is created.
2. When the icon is minimized, the icon is added to the stacking list. We don't 
need create it.
3. When the icon is un-miminized is removed from the stacking list, but not 
destroyed.
You can repeat 2,3.
4. When the window is destroyed, the appicon is destroyed.

Now has more sense.

Problem?

If the application is minimized, the icon is in the stacking list, so we MUST 
remove it from the stacking list before destroy it, else, wmaker will crash. 
Then, the patches removes always the icon from the stacking list, even is not 
in it. We can check if the icon is in the stacking list testing if the icon is 
minimized. If minimized, then remove from the stacking list. Or simply remove 
the warning, because now the stacking is balanced.

Before this patch series, the icon was always removed from the screen when was 
maximized (see previous mails in the list about this problem). With these 
patches, this problem go away.

Please, don't apply patch 3 without 4 or 4 without 3. They should be rebased in 
only one, but is more easy to patch review. About patch 6, probably we should 
change the icon_destroy to test if the icon is minimized.

Cheers,
kix


-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to [email protected].

Reply via email to