On Wed, Jan 22, 2025 at 12:12:38PM +0100, Mikau wrote:
> On Tue, 21 Jan 2025 20:27:53 +0100
> Hiltjo Posthuma <hil...@codemadness.org> wrote:
> 
> > On Tue, Jan 21, 2025 at 08:28:42PM +0300, Mikhail Pchelin wrote:
> > > On Tue, Jan 21, 2025 at 05:03:25PM +0000, NRK wrote:  
> > > > > +     if (clients[c]->urgent && (wmh = XGetWMHints(dpy,
> > > > > clients[c]->win)) &&
> > > > > +         (win_wmh = XGetWMHints(dpy, win))) {  
> > > > 
> > > > This will leak if the first XGetWMHints succeeds but the 2nd one
> > > > fails.  
> > > 
> > > Thank you for the review, updated version bellow.
> > > 
> > > From 155a030ea55845e5ec81d08b3cf3f9f08fb876d1 Mon Sep 17 00:00:00
[...]
> > >   
> > 
> > Hi,
> > 
> > Thanks for the patch, at a glance it looks good.
> > 
> > Can anyone confirm this makes sense. I do not use gnome-shell myself.
> > 
> > Thank you,
> > 
> 
> 
> Hi,
> 
> as far as I understand it, the way urgency was handled by tabbed even
> before this patch was wrong. The correct way for urgency to work is:
> - client wants attention
> - client sets XUrgencyHint
> - user focuses client
> - client receives FocusEvent, notifying it that it has gotten attention
> - client removes XUrgencyHint, as it is now satisfied
> The WM should at no point be setting or removing a clients
> XUrgencyHint. The WM_HINTS property as a whole is meant as one way
> communication from the client to the WM. Compare the ICCCM:
> >The WM_HINTS property (whose type is WM_HINTS) is used to communicate
> >to the window manager.
> and
> >Clients must provide some means by which the user can cause the
> >UrgencyHint flag to be set to zero or the window to be withdrawn.
> The only urgency hint tabbed should be modifying is its own.
> 
> dwm does the same mistake, btw.
> 

Did it get mixed up with _NET_WM_STATE_DEMANDS_ATTENTION?

>From https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
> _NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with the
> window happened. [...] This state may be set by both the Client and the
> Window Manager. It should be unset by the Window Manager when it decides
> the window got the required attention (usually, that it got activated).

-- 
Storkman

Reply via email to