mirror of
https://github.com/labwc/labwc.git
synced 2026-03-22 05:33:57 -04:00
tree-wide: auto-replace of (struct server *)
#!/bin/bash
read -r -d '' EXPRS << EOF
s/xwayland->server/xwayland->svr/g;
s/\t*struct server \*server;\n//g;
s/\t*struct server \*server =.*?;\n//gs;
s/\t*.* = ([a-z_]*->)*server[;,]\n//g;
s/\{\n\n/\{\n/g;
s/\n\n+/\n\n/g;
s/\(\s*struct server \*server\)/(void)/g;
s/\(\s*struct server \*server,\s*/(/g;
s/,\s*struct server \*server\)/)/g;
s/,\s*struct server \*server,\s*/, /g;
s/\(\s*([a-z_]*->)*server\)/()/g;
s/\(\s*([a-z_]*->)*server,\s*/(/g;
s/,\s*([a-z_]*->)*server\)/)/g;
s/,\s*([a-z_]*->)*server,\s*/, /g;
s/([a-z_]*->)*server->/g_server./g;
s/xwayland->svr/xwayland->server/g;
EOF
find src include \( -name \*.c -o -name \*.h \) -exec \
perl -0777 -i -pe "$EXPRS" \{\} \;
This commit is contained in:
parent
60ac8f07bb
commit
cb49bddf63
81 changed files with 1522 additions and 1682 deletions
|
|
@ -52,7 +52,7 @@ touch_get_coords(struct seat *seat, struct wlr_touch *touch, double x, double y,
|
|||
* This matches normal pointer/mouse behavior where the first click on
|
||||
* a surface closes a root/client menu.
|
||||
*/
|
||||
if (seat->server->input_mode == LAB_INPUT_STATE_MENU) {
|
||||
if (g_server.input_mode == LAB_INPUT_STATE_MENU) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ touch_get_coords(struct seat *seat, struct wlr_touch *touch, double x, double y,
|
|||
|
||||
double sx, sy;
|
||||
struct wlr_scene_node *node =
|
||||
wlr_scene_node_at(&seat->server->scene->tree.node, lx, ly, &sx, &sy);
|
||||
wlr_scene_node_at(&g_server.scene->tree.node, lx, ly, &sx, &sy);
|
||||
|
||||
*x_offset = lx - sx;
|
||||
*y_offset = ly - sy;
|
||||
|
|
@ -169,7 +169,7 @@ handle_touch_down(struct wl_listener *listener, void *data)
|
|||
if (mousebind->mouse_event == MOUSE_ACTION_PRESS
|
||||
&& mousebind->button == BTN_LEFT
|
||||
&& mousebind->context == LAB_NODE_CLIENT) {
|
||||
actions_run(view, seat->server, &mousebind->actions, NULL);
|
||||
actions_run(view, &mousebind->actions, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ handle_touch_up(struct wl_listener *listener, void *data)
|
|||
} else {
|
||||
cursor_emulate_button(seat, BTN_LEFT,
|
||||
WL_POINTER_BUTTON_STATE_RELEASED, event->time_msec);
|
||||
ssd_update_hovered_button(seat->server, NULL);
|
||||
ssd_update_hovered_button(NULL);
|
||||
}
|
||||
wl_list_remove(&touch_point->link);
|
||||
zfree(touch_point);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue