Heya,

I've been usin enlightnement for a little bit, and got used to the raise window 
behavior. Regardless of focus mode, you can click anywhere in the window to raise it.

After doin a bit of my own work, I found an older patch on 
blackbox.thelinuxcommunity.org, so I just updated that one to work with 0.62.1.

This patch uses a buncha #ifdef's, so it's a bit cleaner.

If anyone is interested, just apply the patch:
        tar zxf backbox-0.62.1.tar.gz
        patch -p 0 < blackbox-0.62.1-sloppy_raise_anywhere.diff
        cd blackbox-0.62.1
        CPPFLAGS=-DSLOPPY_RAISE_ANYWHERE=\"1\" ./configure && make

It looks like blackbox.thelinuxcommunity.org is pretty outdated. The most recent news 
is from '99, and the current version of bb listed on the page is 0.60.3, so I wasn't 
sure where else to send this.

I'm don't know if anyone would find this useful, but maybe if there's enough interest, 
someone could toss this on an ftp somewhere. Is there another patch repository?

In case this gets messed up through the list, here's my ftp.

ftp://beer.dct.com/pub/WindowManagers/Blackbox/patches/blackbox-0.62.1-sloppy_raise_anywhere.diff

On a side note, I've also become accustom to the window placement of 'Under Mouse'. 
Anyone up for writing this one? :)

I'm not on the list, so if you could cc any replies to me, I'd appreciate it.

Thanks,

Mike
diff -ruN blackbox-0.62.1.old/src/Window.cc blackbox-0.62.1/src/Window.cc
--- blackbox-0.62.1.old/src/Window.cc   Sat Jan 19 10:06:30 2002
+++ blackbox-0.62.1/src/Window.cc       Wed Mar  6 14:04:31 2002
@@ -260,7 +260,17 @@
 
   associateClientWindow();
 
+
+/*
+ * define SLOPPY_RAISE_ANYWHERE if you use sloppy focus, but want to be able
+ * to click anywhere in the window to raise it.
+ *
+ * Example:
+ *  CPPFLAGS=-DSLOPPY_RAISE_ANYWHERE=\"1\" ./configure && make
+ */
+#ifndef SLOPPY_RAISE_ANYWHERE
   if (! screen->isSloppyFocus())
+#endif
     blackbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
         GrabModeSync, GrabModeSync, None, None);
 
@@ -816,11 +826,15 @@
 
   configure(frame.x, frame.y, frame.width, frame.height);
 
+#ifndef SLOPPY_RAISE_ANYWHERE
   if (! screen->isSloppyFocus())
+#endif
     blackbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
         GrabModeSync, GrabModeSync, None, None);
+#ifndef SLOPPY_RAISE_ANYWHERE
   else
     blackbox->ungrabButton(Button1, 0, frame.plate);
+#endif
 
   if (windowmenu) {
     windowmenu->move(windowmenu->getX(), frame.y + frame.title_h);
@@ -2467,7 +2481,11 @@
   if (frame.maximize_button == be->window) {
     redrawMaximizeButton(True);
   } else if (be->button == 1 || (be->button == 3 && be->state == Mod1Mask)) {
+#ifdef SLOPPY_RAISE_ANYWHERE
+    if (! flags.focused)
+#else
     if ((! flags.focused) && (! screen->isSloppyFocus()))
+#endif
       setInputFocus();
 
     if (frame.iconify_button == be->window) {
@@ -2475,7 +2493,11 @@
     } else if (frame.close_button == be->window) {
       redrawCloseButton(True);
     } else if (frame.plate == be->window) {
+#ifdef SLOPPY_RAISE_ANYWHERE
+      if (! flags.focused)
+#else
       if ((! flags.focused) && (! screen->isSloppyFocus()))
+#endif
        setInputFocus();
 
       if (windowmenu && windowmenu->isVisible()) windowmenu->hide();

Reply via email to