]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
only pass thru events when the menu is open, don't for other stuff
[chaz/openbox] / openbox / action.c
index 4187c26243d8f1ceb87ec7ff8119058c0b34335f..fc6f5a78292b2d9dffa8b1df44171079a271277d 100644 (file)
@@ -41,7 +41,7 @@ inline void client_action_start(union ActionData *data)
 {
     if (config_focus_follow)
         if (data->any.context != OB_FRAME_CONTEXT_CLIENT && !data->any.button)
-            grab_pointer(TRUE, OB_CURSOR_NONE);
+            grab_pointer(TRUE, FALSE, OB_CURSOR_NONE);
 }
 
 inline void client_action_end(union ActionData *data)
@@ -49,7 +49,7 @@ inline void client_action_end(union ActionData *data)
     if (config_focus_follow)
         if (data->any.context != OB_FRAME_CONTEXT_CLIENT) {
             if (!data->any.button) {
-                grab_pointer(FALSE, OB_CURSOR_NONE);
+                grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
             } else {
                 ObClient *c;
 
@@ -1013,7 +1013,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 }
 
 void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
-                     guint state, gint button, gint x, gint y, Time time,
+                     guint state, guint button, gint x, gint y, Time time,
                      gboolean cancel, gboolean done)
 {
     GSList *it;
@@ -1103,17 +1103,18 @@ void action_execute(union ActionData *data)
                           cmd, e->message);
                 g_error_free(e);
             } else if (data->execute.startupnotify) {
-                gchar **env, *program;
+                gchar *program;
                 
                 program = g_path_get_basename(argv[0]);
-                env = sn_get_spawn_environment(program,
-                                               data->execute.name,
-                                               data->execute.icon_name,
-                                               /* launch it on the current
-                                                  desktop */
-                                               screen_desktop,
-                                               data->execute.any.time);
-                if (!g_spawn_async(NULL, argv, env, G_SPAWN_SEARCH_PATH |
+                /* sets up the environment */
+                sn_setup_spawn_environment(program,
+                                           data->execute.name,
+                                           data->execute.icon_name,
+                                           /* launch it on the current
+                                              desktop */
+                                           screen_desktop,
+                                           data->execute.any.time);
+                if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH |
                                    G_SPAWN_DO_NOT_REAP_CHILD,
                                    NULL, NULL, NULL, &e)) {
                     g_warning("failed to execute '%s': %s",
@@ -1121,7 +1122,7 @@ void action_execute(union ActionData *data)
                     g_error_free(e);
                     sn_spawn_cancel();
                 }
-                g_strfreev(env);
+                unsetenv("DESKTOP_STARTUP_ID");
                 g_free(program);
                 g_strfreev(argv);
             } else {
@@ -1166,8 +1167,7 @@ void action_focus(union ActionData *data)
            moving on us */
         event_halt_focus_delay();
 
-        if (client_validate(data->client.any.c))
-            client_focus(data->client.any.c);
+        client_focus(data->client.any.c);
     }
 }
 
@@ -1621,16 +1621,8 @@ void action_exit(union ActionData *data)
 void action_showmenu(union ActionData *data)
 {
     if (data->showmenu.name) {
-        gint x, y;
-        ObClient *c = data->showmenu.any.c;
-        if (data->any.button == -1 && c) {
-            x = c->frame->area.x + c->frame->size.left;
-            y = c->frame->area.y + c->frame->size.top;
-        } else {
-            x = data->any.x;
-            y = data->any.y;
-        }
-        menu_show(data->showmenu.name, x, y, c);
+        menu_show(data->showmenu.name, data->any.x, data->any.y,
+                  data->showmenu.any.c);
     }
 }
 
This page took 0.026598 seconds and 4 git commands to generate.