]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
get the mouse pointer position if it is on another screen too.
[chaz/openbox] / openbox / action.c
index f8e66439daffc41bc7969667804ff7c74efc647c..4839088c710ffc25e20606f40efd4656fff3e62c 100644 (file)
@@ -1199,10 +1199,9 @@ void action_execute(union ActionData *data)
 void action_activate(union ActionData *data)
 {
     if (data->client.any.c) {
-        /* similar to the openbox dock for dockapps, don't let user actions
-           give focus to 3rd-party docks (panels) either (unless they ask for
-           it themselves). */
-        if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) {
+        if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
+            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+        {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
             event_halt_focus_delay();
@@ -1220,10 +1219,9 @@ void action_activate(union ActionData *data)
 void action_focus(union ActionData *data)
 {
     if (data->client.any.c) {
-        /* similar to the openbox dock for dockapps, don't let user actions
-           give focus to 3rd-party docks (panels) either (unless they ask for
-           it themselves). */
-        if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) {
+        if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
+            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+        {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
             event_halt_focus_delay();
@@ -1351,7 +1349,7 @@ void action_toggle_omnipresent(union ActionData *data)
 { 
     client_set_desktop(data->client.any.c,
                        data->client.any.c->desktop == DESKTOP_ALL ?
-                       screen_desktop : DESKTOP_ALL, FALSE, FALSE);
+                       screen_desktop : DESKTOP_ALL, FALSE);
 }
 
 void action_move_relative_horz(union ActionData *data)
@@ -1515,7 +1513,7 @@ void action_send_to_desktop(union ActionData *data)
 
     if (data->sendto.desk < screen_num_desktops ||
         data->sendto.desk == DESKTOP_ALL) {
-        client_set_desktop(c, data->sendto.desk, data->sendto.follow, FALSE);
+        client_set_desktop(c, data->sendto.desk, data->sendto.follow);
         if (data->sendto.follow)
             screen_set_desktop(data->sendto.desk, TRUE);
     }
@@ -1582,7 +1580,7 @@ void action_send_to_desktop_dir(union ActionData *data)
         !data->sendtodir.inter.final ||
         data->sendtodir.inter.cancel)
     {
-        client_set_desktop(c, d, data->sendtodir.follow, FALSE);
+        client_set_desktop(c, d, data->sendtodir.follow);
         if (data->sendtodir.follow)
             screen_set_desktop(d, TRUE);
     }
This page took 0.024606 seconds and 4 git commands to generate.