merge r6421-6427 from trunk
authorDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 03:21:18 +0000 (03:21 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 03:21:18 +0000 (03:21 +0000)
Makefile.am
openbox/action.c
openbox/focus.c
openbox/frame.c
openbox/keyboard.c
openbox/menuframe.c

index 373f78b394cf7b2b8af857d23d8490befe79432a..f815b97eb3880cd8b1723946fc39f8ed7087eb3d 100644 (file)
@@ -410,7 +410,9 @@ dist_noinst_DATA = \
 dist_doc_DATA = \
        COMPLIANCE \
        README \
-       AUTHORS
+       AUTHORS \
+       data/rc.xsd \
+       data/menu.xsd
 
 EXTRA_DIST = \
        config.rpath \
index 931cff392917417e0faba141f1668a995045b853..0f1a04d2dbcdf74c354cc38325917fdb570605d9 100644 (file)
@@ -48,8 +48,21 @@ inline void client_action_start(union ActionData *data)
 inline void client_action_end(union ActionData *data)
 {
     if (config_focus_follow)
-        if (data->any.context != OB_FRAME_CONTEXT_CLIENT && !data->any.button)
-            grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+        if (data->any.context != OB_FRAME_CONTEXT_CLIENT) {
+            if (!data->any.button) {
+                grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+            } else {
+                ObClient *c;
+
+                /* usually this is sorta redundant, but with a press action
+                   that moves windows our from under the cursor, the enter
+                   event will come as a GrabNotify which is ignored, so this
+                   makes a fake enter event
+                */
+                if ((c = client_under_pointer()))
+                    event_enter_client(c);
+            }
+        }
 }
 
 typedef struct
@@ -1255,7 +1268,8 @@ void action_activate(union ActionData *data)
 {
     if (data->client.any.c) {
         if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
-            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+            (data->any.context != OB_FRAME_CONTEXT_CLIENT &&
+             data->any.context != OB_FRAME_CONTEXT_FRAME))
         {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
@@ -1275,7 +1289,8 @@ void action_focus(union ActionData *data)
 {
     if (data->client.any.c) {
         if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
-            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+            (data->any.context != OB_FRAME_CONTEXT_CLIENT &&
+             data->any.context != OB_FRAME_CONTEXT_FRAME))
         {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
index 2c66336da39e3ca281647253e03f38b39610f424..4aeeab5bd9753eb2dd45724005852a6ec9117a3a 100644 (file)
@@ -594,6 +594,7 @@ static gboolean valid_focus_target(ObClient *ft,
     /* it's not set to skip the taskbar (unless it is a type that would be
        expected to set this hint */
     ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK ||
+                 ft->type == OB_CLIENT_TYPE_DESKTOP ||
                  ft->type == OB_CLIENT_TYPE_TOOLBAR ||
                  ft->type == OB_CLIENT_TYPE_MENU ||
                  ft->type == OB_CLIENT_TYPE_UTILITY) ||
index 86b2258b781ab5ad0133872621a316024a88826b..44fea5bc03017d80f58b3948deb8abda77909698 100644 (file)
 #define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
                            f->cbwidth_y)
 
-/* the offsets for the titlebar elements from the edge of the titlebar.
-   negative means from the right edge. */
-gint icon_off;
-gint label_off;
-gint iconify_off;
-gint desk_off;
-gint shade_off;
-gint max_off;
-gint close_off;
-
-
 static void flash_done(gpointer data);
 static gboolean flash_timeout(gpointer data);
 
index 84ae2a38e2d25f7eac85b6c4f74644502b2c1641..d758b3869e29cc8868d7b90a9d13102319d06715 100644 (file)
@@ -221,7 +221,7 @@ gboolean keyboard_interactive_grab(guint state, ObClient *client,
         if (!grab_keyboard(TRUE))
             return FALSE;
     } else if (action->func != istate.action->func) {
-        keyboard_interactive_end(state, FALSE, action->data.any.time, FALSE);
+        keyboard_interactive_end(state, TRUE, action->data.any.time, FALSE);
     }
 
     istate.active = TRUE;
index 367ed1c47e541ab129bdf2a46c32e5e9f7177b2a..b3938a4b5babfb093b9632b2c4271726a391ec6c 100644 (file)
@@ -971,6 +971,9 @@ static gboolean menu_frame_show(ObMenuFrame *self)
 
     if (menu_frame_visible == NULL) {
         /* no menus shown yet */
+
+        /* grab the pointer in such a way as to pass through "owner events"
+           so that we can get enter/leave notifies in the menu. */
         if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER))
             return FALSE;
         if (!grab_keyboard(TRUE)) {