merge r6031-6032 from trunk
authorDana Jansens <danakj@orodu.net>
Fri, 4 May 2007 07:21:47 +0000 (07:21 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 4 May 2007 07:21:47 +0000 (07:21 +0000)
openbox/action.c
openbox/client.c
openbox/mouse.c

index f57ab60575d0f6d5e58e84405301f578a12c8a78..5d1c08a9c356a164c4f0bf35e20dcdd746c5f59c 100644 (file)
@@ -1098,6 +1098,17 @@ void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
             if (a->data.any.interactive || a->func == action_moveresize) {
                 /* interactive actions are not queued */
                 a->func(&a->data);
+            } else if (context == OB_FRAME_CONTEXT_CLIENT ||
+                       (c && c->type == OB_CLIENT_TYPE_DESKTOP &&
+                        context == OB_FRAME_CONTEXT_DESKTOP)) {
+                /* XXX MORE UGLY HACK
+                   actions from clicks on client windows are NOT queued.
+                   this solves the mysterious click-and-drag-doesnt-work
+                   problem. it was because the window gets focused and stuff
+                   after the button event has already been passed through. i
+                   dont really know why it should care but it does and it makes
+                   a difference. */
+                a->func(&a->data);
             } else
                 ob_main_loop_queue_action(ob_main_loop, a);
         }
index 256190b97ff7ed74a670daadfe466807384d9274..e943421791aafa266fbb1822370f00e34ff694a6 100644 (file)
@@ -262,7 +262,9 @@ void client_manage(Window window)
 
     /* choose the events we want to receive on the CLIENT window */
     attrib_set.event_mask = CLIENT_EVENTMASK;
-    XChangeWindowAttributes(ob_display, window, CWEventMask, &attrib_set);
+    attrib_set.do_not_propagate_mask = CLIENT_NOPROPAGATEMASK;
+    XChangeWindowAttributes(ob_display, window,
+                            CWEventMask|CWDontPropagate, &attrib_set);
 
 
     /* create the ObClient struct, and populate it from the hints on the
@@ -2611,7 +2613,8 @@ static void client_iconify_recursive(ObClient *self,
         } else {
             self->iconic = iconic;
 
-            if (curdesk)
+            if (curdesk && self->desktop != screen_desktop &&
+                self->desktop != DESKTOP_ALL)
                 client_set_desktop(self, screen_desktop, FALSE);
 
             /* this puts it after the current focused window */
@@ -3182,7 +3185,8 @@ void client_activate(ObClient *self, gboolean here, gboolean user)
         if (self->iconic)
             client_iconify(self, FALSE, here);
         if (self->desktop != DESKTOP_ALL &&
-            self->desktop != screen_desktop) {
+            self->desktop != screen_desktop)
+        {
             if (here)
                 client_set_desktop(self, screen_desktop, FALSE);
             else
index 517ed6e695c362ac6b3ae0d2fdfa2705a1e0e887..27172d525c614c7933b297d1f9108e3947c7edd6 100644 (file)
@@ -108,7 +108,7 @@ void mouse_grab_for_client(ObClient *client, gboolean grab)
                 mode = GrabModeAsync;
                 mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask;
             } else if (CLIENT_CONTEXT(i, client)) {
-                win = client->window;
+                win = client->frame->plate;
                 mode = GrabModeSync; /* this is handled in event */
                 mask = ButtonPressMask; /* can't catch more than this with Sync
                                            mode the release event is