[PATCH weston 15/16] tablet: Fixing compilation issues in weston desktop-shell related to tablet support patches.
Bastian Farkas
bfarkas at de.adit-jv.com
Wed Oct 25 11:17:27 UTC 2017
Function names and structs changed.
Signed-off-by: Bastian Farkas <bfarkas at de.adit-jv.com>
---
desktop-shell/shell.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 54ee4a2..1dae736 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -436,7 +436,7 @@ shell_tablet_tool_grab_start(struct shell_tablet_tool_grab *grab,
struct desktop_shell *shell = shsurf->shell;
if (tool->seat->pointer_state)
- popup_grab_end(tool->seat->pointer_state);
+ weston_pointer_end_grab(tool->seat->pointer_state);
grab->grab.interface = interface;
grab->shsurf = shsurf;
@@ -1663,15 +1663,17 @@ tablet_tool_move_grab_motion(struct weston_tablet_tool_grab *grab, uint32_t time
struct weston_tablet_tool_move_grab *move =
(struct weston_tablet_tool_move_grab *)grab;
struct shell_surface *shsurf = move->base.shsurf;
+ struct weston_surface *es;
if (!shsurf)
return;
+ es = weston_desktop_surface_get_surface(shsurf->desktop_surface);
weston_tablet_tool_cursor_move(grab->tool, x, y);
weston_view_set_position(shsurf->view,
wl_fixed_to_double(x + move->dx),
wl_fixed_to_double(y + move->dy));
- weston_compositor_schedule_repaint(shsurf->surface->compositor);
+ weston_compositor_schedule_repaint(es->compositor);
}
static void
@@ -2013,15 +2015,19 @@ handle_tablet_tool_focus(struct wl_listener *listener, void *data)
{
struct weston_tablet_tool *tool = data;
struct weston_view *view = tool->focus;
- struct weston_compositor *compositor;
- uint32_t serial;
+ struct shell_surface *shsurf;
+ struct weston_desktop_client *client;
if (!view)
return;
- compositor = view->surface->compositor;
- serial = wl_display_next_serial(compositor->wl_display);
- ping_handler(view->surface, serial);
+ shsurf = get_shell_surface(view->surface);
+ if (!shsurf)
+ return;
+
+ client = weston_desktop_surface_get_client(shsurf->desktop_surface);
+
+ weston_desktop_client_ping(client);
}
static void
@@ -2875,9 +2881,9 @@ desktop_surface_move(struct weston_desktop_surface *desktop_surface,
wl_list_for_each(tool, &seat->tablet_tool_list, link) {
if (tool->focus && tool->grab_serial == serial) {
- surface = weston_surface_get_main_surface(
+ focus = weston_surface_get_main_surface(
tool->focus->surface);
- if (surface == shsurf->surface &&
+ if (focus == surface &&
surface_tablet_tool_move(shsurf, tool) < 0)
wl_resource_post_no_memory(resource);
}
@@ -4041,7 +4047,9 @@ tablet_tool_activate_binding(struct weston_tablet_tool *tool,
if (tool->focus == NULL)
return;
- activate_binding(tool->seat, data, tool->focus);
+ activate_binding(tool->seat, data, tool->focus,
+ WESTON_ACTIVATE_FLAG_CLICKED |
+ WESTON_ACTIVATE_FLAG_CONFIGURE);
}
static void
--
2.7.4
More information about the wayland-devel
mailing list