On Fri, Nov 23, 2007 at 12:44:57PM +0100, Anselm R. Garbe wrote:
> 
> I thought about this proposal for a while, but I tend to the
> fact that such functionality belongs to a dwm.c patch (esp.
> because the mouse-based tagging is intended to be as is).
> A hook interface to mouse events for the status bar seems a
> little bit overengineered to me.
> 
> You could even separate the handling if you write a
> buttonpress(XEvent *) replacement.

And what about make dwm call a user-defined function instead if
replacing it? What i'm thinking about is something like:

config.h

 #define MOUSEONTITLE mouseontitle

dwm.c
  void
  buttonpress(XEvent *e) {
    unsigned int i, x;
    Client *c;
    XButtonPressedEvent *ev = &e->xbutton;

+ MOUSEONTITLE(e);

    if(ev->window == barwin) { 

 
This will allow me to just add a new function called "mouseontitle"
to handle all the mouse events in the title bar without having to
modify dwm.c

--pancake

Reply via email to