Re: [dwm] zooming a client by name

From: Anselm R. Garbe <arg_AT_10kloc.org>
Date: Tue, 8 Aug 2006 18:20:05 +0200

Note, the I unapplied the NET_ACTIVE_WINDOW patch from official
sources. I attached a wtool.tar.gz tarball which contains a
patch for dwm r228 and a tiny wtool as I described. Actually I'm
not sure it will work out of the box (just tested it without
much success, because dwm does not receive the
ClientMessage send by wtool/main.c:focus().

Thus take my code as framework for what you are going todo. It
works quite well with dwm, I performed:

wtool focus "`wtool list|dmenu`"

However, excpet that dwm does not receive the ClientMessage,
everything seems to be fine (I expect the problem in XSendEvent
of wtool/main.c:focus(). It can only be a very tiny problem.

Let me know if you get it working, however I think it is better
to not support NET_ACTIVE_WINDOW requests for the reason Sander
pointed out.

Regards,
Anselm

On Tue, Aug 08, 2006 at 04:09:24PM +0100, David Tweed wrote:
> Hi Anselm,
>
> Thanks for the advice. I'll reread your message in
> detail later but just to check...
>
> > > (2) A way to ask dwm to focus a window whose title
> > is
> > > the same as a given one.
> >
> > This is the only part, where dwm might provide a way
> > to assist.
> > EWMH defines the _NET_ACTIVE_WINDOW root window
> > property, which
> > can be set by clients to ask the window manager to
> > focus a
> > different window. The changes to achieve this look
> > marginal to
> > me (you need to set this hint when initializing the
> > netwm[NetSupported] atom, beside setting the correct
> > window id whenever focus() is performed (or
> > unmanage())
> > to this property.
> >
> > To enable dwm handling such activation requests you
> > need to
> > extend propertynotify() which might call view() and
> > focus().
>
> Just so I'm clear (you can probably tell I'm not a
> hardcore X hacker :-) ):
>
> Entirely outside of dwm, I can retrieve a list of
> window titles and XId's directly from the XServer. I
> can then send an XEvent with event.xclient.window
> set to the XId of the target window, and with
> event.xclient.message_type set to _NET_ACTIVE_WINDOW.
>
> Then, along with making changes in dwm to make
> _NET_ACTIVE_WINDOW recognised by dwm in general, this
> would provide a way to acheive what I want.
>
> This sounds good; I hadn't realised you could send
> XEvent messages talking about other program's windows
> but if you can do that...
>
> cheers, dave tweed
>
>
>
> ___________________________________________________________
> Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal
> http://uk.docs.yahoo.com/nowyoucan.html
>
> _______________________________________________
> dwm mailing list
> dwm_AT_10kloc.org
> http://wmii.de/cgi-bin/mailman/listinfo/dwm

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361

Received on Tue Aug 08 2006 - 18:20:05 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:30:02 UTC