From ed41bef7ef6bbe7dd21343366812c65f1abf46f9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 2 Aug 2011 16:27:33 -0400 Subject: [PATCH] Rename the fields in ObActionListRun for clarity --- openbox/action.c | 23 ++++++++++----------- openbox/action_list_run.c | 16 +++++++-------- openbox/action_list_run.h | 15 +++++++------- openbox/actions/close.c | 2 +- openbox/actions/decorations.c | 12 +++++------ openbox/actions/desktop.c | 10 +++++----- openbox/actions/directionalwindows.c | 2 +- openbox/actions/execute.c | 12 +++++------ openbox/actions/focus.c | 13 ++++++------ openbox/actions/focustobottom.c | 4 ++-- openbox/actions/fullscreen.c | 4 ++-- openbox/actions/growtoedge.c | 30 ++++++++++++++-------------- openbox/actions/iconify.c | 4 ++-- openbox/actions/kill.c | 4 ++-- openbox/actions/layer.c | 4 ++-- openbox/actions/lower.c | 4 ++-- openbox/actions/maximize.c | 18 ++++++++--------- openbox/actions/move.c | 7 ++++--- openbox/actions/moverelative.c | 4 ++-- openbox/actions/moveresizeto.c | 4 ++-- openbox/actions/movetoedge.c | 8 ++++---- openbox/actions/omnipresent.c | 6 +++--- openbox/actions/raise.c | 4 ++-- openbox/actions/raiselower.c | 4 ++-- openbox/actions/resize.c | 11 +++++----- openbox/actions/resizerelative.c | 4 ++-- openbox/actions/shade.c | 12 +++++------ openbox/actions/showmenu.c | 5 +++-- openbox/actions/unfocus.c | 2 +- openbox/filters/target.c | 2 +- 30 files changed, 127 insertions(+), 123 deletions(-) diff --git a/openbox/action.c b/openbox/action.c index 5810c07c..915f624d 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -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); } } diff --git a/openbox/action_list_run.c b/openbox/action_list_run.c index 5e2af95d..3e912f06 100644 --- a/openbox/action_list_run.c +++ b/openbox/action_list_run.c @@ -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: diff --git a/openbox/action_list_run.h b/openbox/action_list_run.h index 044af78d..be3d65ae 100644 --- a/openbox/action_list_run.h +++ b/openbox/action_list_run.h @@ -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. diff --git a/openbox/actions/close.c b/openbox/actions/close.c index 250bd1f2..eb9db51b 100644 --- a/openbox/actions/close.c +++ b/openbox/actions/close.c @@ -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; } diff --git a/openbox/actions/decorations.c b/openbox/actions/decorations.c index 5e1f956b..05e6e1b6 100644 --- a/openbox/actions/decorations.c +++ b/openbox/actions/decorations.c @@ -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; diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index e86b7378..185e039b 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -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); diff --git a/openbox/actions/directionalwindows.c b/openbox/actions/directionalwindows.c index 05777d4e..e62e9b7f 100644 --- a/openbox/actions/directionalwindows.c +++ b/openbox/actions/directionalwindows.c @@ -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; diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index f7825fb1..22879bcc 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -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; diff --git a/openbox/actions/focus.c b/openbox/actions/focus.c index 9bc5c09c..f1e6f292 100644 --- a/openbox/actions/focus.c +++ b/openbox/actions/focus.c @@ -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(); diff --git a/openbox/actions/focustobottom.c b/openbox/actions/focustobottom.c index afaa80ef..942d7887 100644 --- a/openbox/actions/focustobottom.c +++ b/openbox/actions/focustobottom.c @@ -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; } diff --git a/openbox/actions/fullscreen.c b/openbox/actions/fullscreen.c index 25a94fa8..68f0738d 100644 --- a/openbox/actions/fullscreen.c +++ b/openbox/actions/fullscreen.c @@ -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; diff --git a/openbox/actions/growtoedge.c b/openbox/actions/growtoedge.c index c254474b..7bfebe10 100644 --- a/openbox/actions/growtoedge.c +++ b/openbox/actions/growtoedge.c @@ -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; diff --git a/openbox/actions/iconify.c b/openbox/actions/iconify.c index 1bfc9cc8..fddf8f9d 100644 --- a/openbox/actions/iconify.c +++ b/openbox/actions/iconify.c @@ -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); } diff --git a/openbox/actions/kill.c b/openbox/actions/kill.c index b2d56cc7..f3f39539 100644 --- a/openbox/actions/kill.c +++ b/openbox/actions/kill.c @@ -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; } diff --git a/openbox/actions/layer.c b/openbox/actions/layer.c index 33d89612..646f20d2 100644 --- a/openbox/actions/layer.c +++ b/openbox/actions/layer.c @@ -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); diff --git a/openbox/actions/lower.c b/openbox/actions/lower.c index 06896c55..a95a2829 100644 --- a/openbox/actions/lower.c +++ b/openbox/actions/lower.c @@ -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); } diff --git a/openbox/actions/maximize.c b/openbox/actions/maximize.c index b8543a1b..71c67e54 100644 --- a/openbox/actions/maximize.c +++ b/openbox/actions/maximize.c @@ -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; diff --git a/openbox/actions/move.c b/openbox/actions/move.c index 7ec72739..883fe71a 100644 --- a/openbox/actions/move.c +++ b/openbox/actions/move.c @@ -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; diff --git a/openbox/actions/moverelative.c b/openbox/actions/moverelative.c index 47d5a8a0..36504b09 100644 --- a/openbox/actions/moverelative.c +++ b/openbox/actions/moverelative.c @@ -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) { diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index da300e62..06acd2dd 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -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) { diff --git a/openbox/actions/movetoedge.c b/openbox/actions/movetoedge.c index 018a075c..c5f8062d 100644 --- a/openbox/actions/movetoedge.c +++ b/openbox/actions/movetoedge.c @@ -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); } } diff --git a/openbox/actions/omnipresent.c b/openbox/actions/omnipresent.c index 1a6c91d5..7fc950c4 100644 --- a/openbox/actions/omnipresent.c +++ b/openbox/actions/omnipresent.c @@ -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); } diff --git a/openbox/actions/raise.c b/openbox/actions/raise.c index da5389be..694a19c5 100644 --- a/openbox/actions/raise.c +++ b/openbox/actions/raise.c @@ -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); } diff --git a/openbox/actions/raiselower.c b/openbox/actions/raiselower.c index 63f471a6..abb85de7 100644 --- a/openbox/actions/raiselower.c +++ b/openbox/actions/raiselower.c @@ -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); } diff --git a/openbox/actions/resize.c b/openbox/actions/resize.c index c479f755..15572bf2 100644 --- a/openbox/actions/resize.c +++ b/openbox/actions/resize.c @@ -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; diff --git a/openbox/actions/resizerelative.c b/openbox/actions/resizerelative.c index b6bd1ff2..7cf986c2 100644 --- a/openbox/actions/resizerelative.c +++ b/openbox/actions/resizerelative.c @@ -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; diff --git a/openbox/actions/shade.c b/openbox/actions/shade.c index 752220f4..f97c5171 100644 --- a/openbox/actions/shade.c +++ b/openbox/actions/shade.c @@ -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; diff --git a/openbox/actions/showmenu.c b/openbox/actions/showmenu.c index a7ef2985..272c7de5 100644 --- a/openbox/actions/showmenu.c +++ b/openbox/actions/showmenu.c @@ -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; } diff --git a/openbox/actions/unfocus.c b/openbox/actions/unfocus.c index bc26dfef..40d7b282 100644 --- a/openbox/actions/unfocus.c +++ b/openbox/actions/unfocus.c @@ -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; } diff --git a/openbox/filters/target.c b/openbox/filters/target.c index 49059975..a078094c 100644 --- a/openbox/filters/target.c +++ b/openbox/filters/target.c @@ -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; } -- 2.34.1