Rename the fields in ObActionListRun for clarity
authorDana Jansens <danakj@orodu.net>
Tue, 2 Aug 2011 20:27:33 +0000 (16:27 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:55:15 +0000 (18:55 -0400)
30 files changed:
openbox/action.c
openbox/action_list_run.c
openbox/action_list_run.h
openbox/actions/close.c
openbox/actions/decorations.c
openbox/actions/desktop.c
openbox/actions/directionalwindows.c
openbox/actions/execute.c
openbox/actions/focus.c
openbox/actions/focustobottom.c
openbox/actions/fullscreen.c
openbox/actions/growtoedge.c
openbox/actions/iconify.c
openbox/actions/kill.c
openbox/actions/layer.c
openbox/actions/lower.c
openbox/actions/maximize.c
openbox/actions/move.c
openbox/actions/moverelative.c
openbox/actions/moveresizeto.c
openbox/actions/movetoedge.c
openbox/actions/omnipresent.c
openbox/actions/raise.c
openbox/actions/raiselower.c
openbox/actions/resize.c
openbox/actions/resizerelative.c
openbox/actions/shade.c
openbox/actions/showmenu.c
openbox/actions/unfocus.c
openbox/filters/target.c

index 5810c07c4460bc952985cc096392e9c191bde80d..915f624d900a7380bec43d29085893e2385bb4af 100644 (file)
@@ -292,12 +292,12 @@ gboolean action_run(ObAction *act, const ObActionListRun *data,
             action_interactive_cancel_act();
         run_i = TRUE;
         if (i_run != this_run && act->i_pre)
-            run_i = act->i_pre(data->state, act->options);
+            run_i = act->i_pre(data->mod_state, act->options);
     }
 
     run = TRUE;
     if (run_i) {
-        run = action_interactive_begin_act(act, data->state);
+        run = action_interactive_begin_act(act, data->mod_state);
         ran_interactive = TRUE;
     }
 
@@ -312,7 +312,7 @@ gboolean action_run(ObAction *act, const ObActionListRun *data,
             if (action_is_interactive(act))
                 action_interactive_end_act();
             /* XXX else if (client_set_contains(focus_client)) */
-            else if (data->client && data->client == focus_client)
+            else if (data->target && data->target == focus_client)
                 event_update_user_time();
         }
     }
@@ -393,11 +393,9 @@ void action_client_move(const ObActionListRun *data, gboolean start)
     if (start)
         ignore_start = event_start_ignore_all_enters();
     else if (config_focus_follow &&
-             data->context != OB_FRAME_CONTEXT_CLIENT)
+             data->pointer_context != OB_FRAME_CONTEXT_CLIENT)
     {
-        if (data->uact == OB_USER_ACTION_MOUSE_PRESS) {
-            struct _ObClient *c;
-
+        if (data->user_act == OB_USER_ACTION_MOUSE_PRESS) {
             /* 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
@@ -408,21 +406,22 @@ void action_client_move(const ObActionListRun *data, gboolean start)
                should be ignored
             */
             if (!grab_on_pointer()) {
-                if ((c = client_under_pointer()) && c != data->client) {
+                struct _ObClient *under = client_under_pointer();
+                if (under && under != data->pointer_over) {
                     ob_debug_type(OB_DEBUG_FOCUS,
                                   "Generating fake enter because we did a "
                                   "mouse-event action");
-                    event_enter_client(c);
+                    event_enter_client(under);
                 }
-                else if (!c && c != data->client) {
+                else if (!under && under != data->pointer_over) {
                     ob_debug_type(OB_DEBUG_FOCUS,
                                   "Generating fake leave because we did a "
                                   "mouse-event action");
-                    event_enter_client(data->client);
+                    event_enter_client(data->target);
                 }
             }
         }
-        else if (!data->button && !config_focus_under_mouse)
+        else if (!data->pointer_button && !config_focus_under_mouse)
             event_end_ignore_all_enters(ignore_start);
     }
 }
index 5e2af95d13a1dab529d47bb5ad48e28b06429cb9..3e912f064759acddaa4cda3f8e1f497241d7d683 100644 (file)
@@ -51,13 +51,13 @@ gboolean action_list_run(ObActionList *acts,
     if (x < 0 && y < 0)
         screen_pointer_pos(&x, &y);
 
-    action_data.uact = uact;
-    action_data.state = state;
-    action_data.x = x;
-    action_data.y = y;
-    action_data.button = button;
-    action_data.context = con;
-    action_data.client = client;
+    action_data.user_act = uact;
+    action_data.mod_state = state;
+    action_data.pointer_x = x;
+    action_data.pointer_y = y;
+    action_data.pointer_button = button;
+    action_data.pointer_context = con;
+    action_data.target = client;
     /* if a pointer started the event clicking on a window, it must be under
        the pointer */
     action_data.pointer_over = client ? client : client_under_pointer();
@@ -80,7 +80,7 @@ static gboolean run_list(ObActionList *acts, const ObActionListRun *data,
     if (!myset) {
         switch (action_default_filter(acts->u.action)) {
         case OB_ACTION_DEFAULT_FILTER_SINGLE:
-            myset = client_set_single(data->client); break;
+            myset = client_set_single(data->target); break;
         case OB_ACTION_DEFAULT_FILTER_EMPTY:
             myset = client_set_empty(); break;
         case OB_ACTION_DEFAULT_FILTER_ALL:
index 044af78d6f18b3c8d9176db94dc7b0c082b9981e..be3d65aef596f5317f93b61ec39dcb328f858a08 100644 (file)
@@ -31,15 +31,16 @@ struct _ObActionList;
   it.
 */
 struct _ObActionListRun {
-    ObUserAction uact;
-    guint state;
+    ObUserAction user_act;
+    guint mod_state;
 
-    gint x;
-    gint y;
-    gint button;
-    ObFrameContext context;
-    struct _ObClient *client;
+    gint pointer_x;
+    gint pointer_y;
+    gint pointer_button;
+    ObFrameContext pointer_context;
     struct _ObClient *pointer_over;
+
+    struct _ObClient *target;
 };
 
 /*! Run an action list.
index 250bd1f2e0a9d6b84cff5ba1f404c9992b19e0bb..eb9db51b4294fa70cea449e75da435115cfd926b 100644 (file)
@@ -13,7 +13,7 @@ void action_close_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) client_close(data->client);
+    if (data->target) client_close(data->target);
 
     return FALSE;
 }
index 5e1f956b5c7e84111a4e15b40dd5ec2372ac9dc9..05e6e1b6175f3dfb67bd0a4b8ac87a802e4076ac 100644 (file)
@@ -19,9 +19,9 @@ void action_decorations_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_set_undecorated(data->client, FALSE);
+        client_set_undecorated(data->target, FALSE);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -30,9 +30,9 @@ static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_set_undecorated(data->client, TRUE);
+        client_set_undecorated(data->target, TRUE);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -41,9 +41,9 @@ static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_set_undecorated(data->client, !data->client->undecorated);
+        client_set_undecorated(data->target, !data->target->undecorated);
         action_client_move(data, FALSE);
     }
     return FALSE;
index e86b73784eae93bcce600f154f16767558a36c65..185e039b97caa7ce34f36e8e4a8c531c507568bf 100644 (file)
@@ -204,19 +204,19 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 
     if (d < screen_num_desktops &&
         (d != screen_desktop ||
-         (data->client && data->client->desktop != screen_desktop))) {
+         (data->target && data->target->desktop != screen_desktop))) {
         gboolean go = TRUE;
 
         action_client_move(data, TRUE);
-        if (o->send && data->client && client_normal(data->client)) {
-            client_set_desktop(data->client, d, o->follow, FALSE);
+        if (o->send && data->target && client_normal(data->target)) {
+            client_set_desktop(data->target, d, o->follow, FALSE);
             go = o->follow;
         }
 
         if (go) {
             screen_set_desktop(d, TRUE);
-            if (data->client)
-                client_bring_helper_windows(data->client);
+            if (data->target)
+                client_bring_helper_windows(data->target);
         }
 
         action_client_move(data, FALSE);
index 05777d4e8bacc86feb28f1a89c5bb5a4c8201463..e62e9b7fb0c1cc538d471e1af069de257eda9668 100644 (file)
@@ -150,7 +150,7 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
     Options *o = options;
 
     if (!o->interactive)
-        end_cycle(FALSE, data->state, o);
+        end_cycle(FALSE, data->mod_state, o);
     else {
         struct _ObClient *ft;
 
index f7825fb14c68d7d3c0f4c6cba15c762da0239bf3..22879bcca412ca065fc2339d14fe37057971173c 100644 (file)
@@ -46,8 +46,8 @@ static void client_dest(ObClient *client, gpointer data)
 
     for (it = prompt_opts; it; it = g_slist_next(it)) {
         Options *o = it->data;
-        if (o->data->client == client)
-            o->data->client = NULL;
+        if (o->data->target == client)
+            o->data->target = NULL;
     }
 }
 
@@ -164,7 +164,7 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
         return FALSE;
     }
 
-    if (data->client) {
+    if (data->target) {
         gchar *c, *before, *expand;
 
         /* replace occurrences of $pid and $wid */
@@ -186,7 +186,7 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
                 expand = g_strdup_printf("%s%s%u",
                                          (expand ? expand : ""),
                                          before,
-                                         data->client->pid);
+                                         data->target->pid);
                 g_free(tmp);
 
                 before = c + 4; /* 4 = strlen("$pid") */
@@ -204,7 +204,7 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
                 expand = g_strdup_printf("%s%s%lu",
                                          (expand ? expand : ""),
                                          before,
-                                         data->client->window);
+                                         data->target->window);
                 g_free(tmp);
 
                 before = c + 4; /* 4 = strlen("$wid") */
@@ -229,7 +229,7 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 
     /* If there is a keyboard grab going on then we need to cancel
        it so the application can grab things */
-    if (data->uact != OB_USER_ACTION_MENU_SELECTION)
+    if (data->user_act != OB_USER_ACTION_MENU_SELECTION)
         event_cancel_all_key_grabs();
 
     e = NULL;
index 9bc5c09cc1e507d8b8a9ce72b88854580a1b839b..f1e6f29216102f5e0dca9c0a592c9e573be19221 100644 (file)
@@ -48,25 +48,26 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
+    if (data->target) {
 /*
         ob_debug("button %d focusable %d context %d %d %d\n",
                  data->button, client_mouse_focusable(data->client),
                  data->context,
                  OB_FRAME_CONTEXT_CLIENT, OB_FRAME_CONTEXT_FRAME);
 */
-        if (data->button == 0 || client_mouse_focusable(data->client) ||
-            (data->context != OB_FRAME_CONTEXT_CLIENT &&
-             data->context != OB_FRAME_CONTEXT_FRAME))
+        if (data->pointer_button == 0 ||
+            client_mouse_focusable(data->target) ||
+            (data->pointer_context != OB_FRAME_CONTEXT_CLIENT &&
+             data->pointer_context != OB_FRAME_CONTEXT_FRAME))
         {
             if (o->stop_int)
                 action_interactive_cancel_act();
 
             action_client_move(data, TRUE);
-            client_activate(data->client, TRUE, o->here, FALSE, FALSE, TRUE);
+            client_activate(data->target, TRUE, o->here, FALSE, FALSE, TRUE);
             action_client_move(data, FALSE);
         }
-    } else if (data->context == OB_FRAME_CONTEXT_DESKTOP) {
+    } else if (data->pointer_context == OB_FRAME_CONTEXT_DESKTOP) {
         if (o->stop_int)
             action_interactive_cancel_act();
 
index afaa80ef3cde39629a9c66070459292a59a4086f..942d788717813fdbf06d79fa65c3c85f7c96ec3e 100644 (file)
@@ -13,7 +13,7 @@ void action_focustobottom_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client)
-        focus_order_to_bottom(data->client);
+    if (data->target)
+        focus_order_to_bottom(data->target);
     return FALSE;
 }
index 25a94fa85fdffbf0d72c98ce3e1d1830f968d04a..68f0738d0cccd6177bb550a687684d131861ff86 100644 (file)
@@ -13,9 +13,9 @@ void action_fullscreen_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_fullscreen(data->client, !data->client->fullscreen);
+        client_fullscreen(data->target, !data->target->fullscreen);
         action_client_move(data, FALSE);
     }
     return FALSE;
index c254474b58ebf7c82c1b4cdd9ce28df7d704d136..7bfebe105791eefc05be862fbe7fc5f1437c9285 100644 (file)
@@ -70,19 +70,19 @@ static gboolean do_grow(const ObActionListRun *data, gint x, gint y, gint w, gin
 
     realw = w;
     realh = h;
-    client_try_configure(data->client, &x, &y, &realw, &realh,
+    client_try_configure(data->target, &x, &y, &realw, &realh,
                          &lw, &lh, TRUE);
     /* if it's going to be resized smaller than it intended, don't
        move the window over */
-    if (x != data->client->area.x) x += w - realw;
-    if (y != data->client->area.y) y += h - realh;
+    if (x != data->target->area.x) x += w - realw;
+    if (y != data->target->area.y) y += h - realh;
 
-    if (x != data->client->area.x || y != data->client->area.y ||
-        realw != data->client->area.width ||
-        realh != data->client->area.height)
+    if (x != data->target->area.x || y != data->target->area.y ||
+        realw != data->target->area.width ||
+        realh != data->target->area.height)
     {
         action_client_move(data, TRUE);
-        client_move_resize(data->client, x, y, realw, realh);
+        client_move_resize(data->target, x, y, realw, realh);
         action_client_move(data, FALSE);
         return TRUE;
     }
@@ -102,17 +102,17 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
     ObDirection opp;
     gint half;
 
-    if (!data->client ||
+    if (!data->target ||
         /* don't allow vertical resize if shaded */
         ((o->dir == OB_DIRECTION_NORTH || o->dir == OB_DIRECTION_SOUTH) &&
-         data->client->shaded))
+         data->target->shaded))
     {
         return FALSE;
     }
 
     if (!o->shrink) {
         /* try grow */
-        client_find_resize_directional(data->client, o->dir, TRUE,
+        client_find_resize_directional(data->target, o->dir, TRUE,
                                        &x, &y, &w, &h);
         if (do_grow(data, x, y, w, h))
             return FALSE;
@@ -123,30 +123,30 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
            (o->dir == OB_DIRECTION_SOUTH ? OB_DIRECTION_NORTH :
             (o->dir == OB_DIRECTION_EAST ? OB_DIRECTION_WEST :
              OB_DIRECTION_EAST)));
-    client_find_resize_directional(data->client, opp, FALSE,
+    client_find_resize_directional(data->target, opp, FALSE,
                                    &x, &y, &w, &h);
     switch (opp) {
     case OB_DIRECTION_NORTH:
-        half = data->client->area.y + data->client->area.height / 2;
+        half = data->target->area.y + data->target->area.height / 2;
         if (y > half) {
             h += y - half;
             y = half;
         }
         break;
     case OB_DIRECTION_SOUTH:
-        half = data->client->area.height / 2;
+        half = data->target->area.height / 2;
         if (h < half)
             h = half;
         break;
     case OB_DIRECTION_WEST:
-        half = data->client->area.x + data->client->area.width / 2;
+        half = data->target->area.x + data->target->area.width / 2;
         if (x > half) {
             w += x - half;
             x = half;
         }
         break;
     case OB_DIRECTION_EAST:
-        half = data->client->area.width / 2;
+        half = data->target->area.width / 2;
         if (w < half)
             w = half;
         break;
index 1bfc9cc8e05f05636fae11e94d1759e9ada79b4f..fddf8f9d36c8f31c309986e927cf7aab1b5c9124 100644 (file)
@@ -13,9 +13,9 @@ void action_iconify_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_iconify(data->client, TRUE, TRUE, FALSE);
+        client_iconify(data->target, TRUE, TRUE, FALSE);
         action_client_move(data, FALSE);
     }
 
index b2d56cc74ae77f305517e55825c065b7f8d5a785..f3f39539a2e206b59b81b4f9e34d2251c6693653 100644 (file)
@@ -13,8 +13,8 @@ void action_kill_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client)
-        client_kill(data->client);
+    if (data->target)
+        client_kill(data->target);
 
     return FALSE;
 }
index 33d896122df1223d6c47dca8060697e7d5be708a..646f20d213d694c0ad6e671dc52c285784f962ba 100644 (file)
@@ -74,8 +74,8 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
-        ObClient *c = data->client;
+    if (data->target) {
+        ObClient *c = data->target;
 
         action_client_move(data, TRUE);
 
index 06896c550397be7b95d33da50fa4b8f91a5bff2d..a95a28297f1cd9d618f42c655dd8247d92f4398b 100644 (file)
@@ -14,9 +14,9 @@ void action_lower_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        stacking_lower(CLIENT_AS_WINDOW(data->client));
+        stacking_lower(CLIENT_AS_WINDOW(data->target));
         action_client_move(data, FALSE);
     }
 
index b8543a1bab5f0de4349973e85f209309e736d3b9..71c67e545eede5b012bd618d94b2e6bba1aa12b5 100644 (file)
@@ -61,9 +61,9 @@ static void free_func(gpointer o)
 static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_maximize(data->client, TRUE, o->dir);
+        client_maximize(data->target, TRUE, o->dir);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -73,9 +73,9 @@ static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_maximize(data->client, FALSE, o->dir);
+        client_maximize(data->target, FALSE, o->dir);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -85,14 +85,14 @@ static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
-    if (data->client) {
+    if (data->target) {
         gboolean toggle;
         action_client_move(data, TRUE);
-        toggle = ((o->dir == HORZ && !data->client->max_horz) ||
-                  (o->dir == VERT && !data->client->max_vert) ||
+        toggle = ((o->dir == HORZ && !data->target->max_horz) ||
+                  (o->dir == VERT && !data->target->max_vert) ||
                   (o->dir == BOTH &&
-                   !(data->client->max_horz && data->client->max_vert)));
-        client_maximize(data->client, toggle, o->dir);
+                   !(data->target->max_horz && data->target->max_vert)));
+        client_maximize(data->target, toggle, o->dir);
         action_client_move(data, FALSE);
     }
     return FALSE;
index 7ec72739c201ce17c816d2b9b1d00ea38cd6489b..883fe71a3e497cc4250f0ccd18d627e3430f8835 100644 (file)
@@ -14,14 +14,15 @@ void action_move_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         guint32 corner;
 
-        corner = data->button != 0 ?
+        corner = data->pointer_button != 0 ?
             OBT_PROP_ATOM(NET_WM_MOVERESIZE_MOVE) :
             OBT_PROP_ATOM(NET_WM_MOVERESIZE_MOVE_KEYBOARD);
 
-        moveresize_start(data->client, data->x, data->y, data->button, corner);
+        moveresize_start(data->target, data->pointer_x, data->pointer_y,
+                         data->pointer_button, corner);
     }
 
     return FALSE;
index 47d5a8a06b2d6135906a1a741a24ea518a798c28..36504b09d44572b316e2294d1e566bcf36999b69 100644 (file)
@@ -50,11 +50,11 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
+    if (data->target) {
         ObClient *c;
         gint x, y, lw, lh, w, h;
 
-        c = data->client;
+        c = data->target;
         x = o->x;
         y = o->y;
         if (o->x_denom || o->y_denom) {
index da300e6200f3dc2e7df2cdd6de24f6c11fd7bf52..06acd2dd46ed158e61b79f5f51ffad049120c92a 100644 (file)
@@ -89,13 +89,13 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
+    if (data->target) {
         Rect *area, *carea;
         ObClient *c;
         guint mon, cmon;
         gint x, y, lw, lh, w, h;
 
-        c = data->client;
+        c = data->target;
         mon = o->monitor;
         cmon = client_monitor(c);
         switch (mon) {
index 018a075ce4bf6cd84d066eaf40d8ac38c68783f3..c5f8062d9c8bb170178520886d2c73f1d921a765 100644 (file)
@@ -59,13 +59,13 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
+    if (data->target) {
         gint x, y;
 
-        client_find_move_directional(data->client, o->dir, &x, &y);
-        if (x != data->client->area.x || y != data->client->area.y) {
+        client_find_move_directional(data->target, o->dir, &x, &y);
+        if (x != data->target->area.x || y != data->target->area.y) {
             action_client_move(data, TRUE);
-            client_move(data->client, x, y);
+            client_move(data->target, x, y);
             action_client_move(data, FALSE);
         }
     }
index 1a6c91d5c8d3d09c19077b9455af3cb6653d9929..7fc950c4e43e7a22b4ab5577e57a2d901a303e0e 100644 (file)
@@ -14,10 +14,10 @@ void action_omnipresent_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_set_desktop(data->client,
-                           data->client->desktop == DESKTOP_ALL ?
+        client_set_desktop(data->target,
+                           data->target->desktop == DESKTOP_ALL ?
                            screen_desktop : DESKTOP_ALL, FALSE, TRUE);
         action_client_move(data, FALSE);
     }
index da5389beb92d481b6a1dbb681b3ba90c22654418..694a19c5fe0ee35687a55692d4c36b5a96560b69 100644 (file)
@@ -14,9 +14,9 @@ void action_raise_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        stacking_raise(CLIENT_AS_WINDOW(data->client));
+        stacking_raise(CLIENT_AS_WINDOW(data->target));
         action_client_move(data, FALSE);
     }
 
index 63f471a69b7c42b63877948a5dec3d6aaeac4380..abb85de771c93a86944882b5515dab580df6fdf3 100644 (file)
@@ -13,9 +13,9 @@ void action_raiselower_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        stacking_restack_request(data->client, NULL, Opposite);
+        stacking_restack_request(data->target, NULL, Opposite);
         action_client_move(data, FALSE);
     }
 
index c479f755b7821b63410f8379a70ab3d28a15a884..15572bf216f7843005acfa976db1d0c74391738c 100644 (file)
@@ -68,16 +68,16 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
-        ObClient *c = data->client;
+    if (data->target) {
+        ObClient *c = data->target;
         guint32 corner;
 
-        if (!data->button)
+        if (!data->pointer_button)
             corner = OBT_PROP_ATOM(NET_WM_MOVERESIZE_SIZE_KEYBOARD);
         else if (o->corner_specified)
             corner = o->corner; /* it was specified in the binding */
         else
-            corner = pick_corner(data->x, data->y,
+            corner = pick_corner(data->pointer_x, data->pointer_y,
                                  c->frame->area.x, c->frame->area.y,
                                  /* use the client size because the frame
                                     can be differently sized (shaded
@@ -88,7 +88,8 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
                                  c->area.height + c->frame->size.top +
                                  c->frame->size.bottom, c->shaded);
 
-        moveresize_start(c, data->x, data->y, data->button, corner);
+        moveresize_start(c, data->pointer_x, data->pointer_y,
+                         data->pointer_button, corner);
     }
 
     return FALSE;
index b6bd1ff2656543a91dbd12f06a8633d283a3e2a5..7cf986c215986d9e209b51c6c6f3080f9b75ba45 100644 (file)
@@ -60,8 +60,8 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
     Options *o = options;
 
-    if (data->client) {
-        ObClient *c = data->client;
+    if (data->target) {
+        ObClient *c = data->target;
         gint x, y, ow, xoff, nw, oh, yoff, nh, lw, lh;
         gint left = o->left, right = o->right, top = o->top, bottom = o->bottom;
 
index 752220f483e29ce02345b6f7dd2078d6dadf4176..f97c51712a50d57d8adc775eb869c3ec6c4140c5 100644 (file)
@@ -19,9 +19,9 @@ void action_shade_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_shade(data->client, TRUE);
+        client_shade(data->target, TRUE);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -30,9 +30,9 @@ static gboolean run_func_on(const ObActionListRun *data, gpointer options)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_shade(data->client, FALSE);
+        client_shade(data->target, FALSE);
         action_client_move(data, FALSE);
     }
     return FALSE;
@@ -41,9 +41,9 @@ static gboolean run_func_off(const ObActionListRun *data, gpointer options)
 /* Always return FALSE because its not interactive */
 static gboolean run_func_toggle(const ObActionListRun *data, gpointer options)
 {
-    if (data->client) {
+    if (data->target) {
         action_client_move(data, TRUE);
-        client_shade(data->client, !data->client->shaded);
+        client_shade(data->target, !data->target->shaded);
         action_client_move(data, FALSE);
     }
     return FALSE;
index a7ef2985e340b0af2806920749fe388a09ca9f60..272c7de527ef242a6eca1825059d72a507fe2f31 100644 (file)
@@ -44,8 +44,9 @@ static gboolean run_func(const ObActionListRun *data, gpointer options)
     Options *o = options;
 
     /* you cannot call ShowMenu from inside a menu */
-    if (data->uact != OB_USER_ACTION_MENU_SELECTION && o->name)
-        menu_show(o->name, data->x, data->y, data->button != 0, data->client);
+    if (data->user_act != OB_USER_ACTION_MENU_SELECTION && o->name)
+        menu_show(o->name, data->pointer_x, data->pointer_y,
+                  data->pointer_button != 0, data->target);
 
     return FALSE;
 }
index bc26dfef93f475bbbc90199e7e4d2a8c41d03842..40d7b282b3614a2de28307a6d16c700820307d9a 100644 (file)
@@ -13,7 +13,7 @@ void action_unfocus_startup(void)
 /* Always return FALSE because its not interactive */
 static gboolean run_func(const ObActionListRun *data, gpointer options)
 {
-    if (data->client && data->client == focus_client)
+    if (data->target && data->target == focus_client)
         focus_fallback(FALSE, FALSE, TRUE, FALSE);
     return FALSE;
 }
index 4905997571c59ecd1d1f079590a02c21a986bf48..a078094c455ac02b496899cca3248caca2acb260 100644 (file)
@@ -23,7 +23,7 @@
 static ObClientSet* filter(gboolean invert, const ObActionListRun *data,
                            gpointer setup_data)
 {
-    ObClientSet *set = client_set_single(data->client);
+    ObClientSet *set = client_set_single(data->target);
     if (invert) set = client_set_minus(client_set_all(), set);
     return set;
 }