[mutter/wip/carlosg/crossings: 9/9] wayland: Drop repicking after ::effects-completed
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/crossings: 9/9] wayland: Drop repicking after ::effects-completed
- Date: Tue, 22 Dec 2020 17:27:53 +0000 (UTC)
commit 556f53ebe1cabb5007d47311b3969326268845ed
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Dec 22 18:01:36 2020 +0100
wayland: Drop repicking after ::effects-completed
These are now done in src/compositor code, so can be avoided here.
With that last piece removed, we can drop all the chain from
meta_wayland_compositor_repick() to meta_wayland_pointer_repick().
src/wayland/meta-wayland-pointer.c | 22 ----------------------
src/wayland/meta-wayland-pointer.h | 2 --
src/wayland/meta-wayland-seat.c | 9 ---------
src/wayland/meta-wayland-seat.h | 2 --
src/wayland/meta-wayland-shell-surface.c | 15 ---------------
src/wayland/meta-wayland.c | 6 ------
src/wayland/meta-wayland.h | 2 --
src/wayland/meta-xwayland-surface.c | 18 ------------------
8 files changed, 76 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index e1683f5751..1cf9a69a22 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -1010,28 +1010,6 @@ meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
return meta_wayland_popup_create (popup_surface, grab);
}
-void
-meta_wayland_pointer_repick (MetaWaylandPointer *pointer)
-{
- MetaBackend *backend = meta_get_backend ();
- ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
-
- graphene_point_t point;
- ClutterActor *new_actor;
-
- clutter_stage_get_device_coords (stage, pointer->device, NULL, &point);
- new_actor =
- clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_REACTIVE,
- point.x, point.y);
-
- clutter_stage_update_device (stage,
- pointer->device, NULL,
- point,
- CLUTTER_CURRENT_TIME,
- new_actor,
- TRUE);
-}
-
void
meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h
index 529177b8cb..5eda5276f4 100644
--- a/src/wayland/meta-wayland-pointer.h
+++ b/src/wayland/meta-wayland-pointer.h
@@ -124,8 +124,6 @@ MetaWaylandPopup *meta_wayland_pointer_start_popup_grab (MetaWaylandPointer
void meta_wayland_pointer_end_popup_grab (MetaWaylandPointer *pointer);
-void meta_wayland_pointer_repick (MetaWaylandPointer *pointer);
-
void meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
wl_fixed_t *x,
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c
index 258c0cbd71..f32173a085 100644
--- a/src/wayland/meta-wayland-seat.c
+++ b/src/wayland/meta-wayland-seat.c
@@ -432,15 +432,6 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
return FALSE;
}
-void
-meta_wayland_seat_repick (MetaWaylandSeat *seat)
-{
- if (!meta_wayland_seat_has_pointer (seat))
- return;
-
- meta_wayland_pointer_repick (seat->pointer);
-}
-
void
meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
MetaWaylandSurface *surface)
diff --git a/src/wayland/meta-wayland-seat.h b/src/wayland/meta-wayland-seat.h
index f41c442075..ae4e1076b4 100644
--- a/src/wayland/meta-wayland-seat.h
+++ b/src/wayland/meta-wayland-seat.h
@@ -69,8 +69,6 @@ gboolean meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
void meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
MetaWaylandSurface *surface);
-void meta_wayland_seat_repick (MetaWaylandSeat *seat);
-
gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
MetaWaylandSurface *surface,
uint32_t serial,
diff --git a/src/wayland/meta-wayland-shell-surface.c b/src/wayland/meta-wayland-shell-surface.c
index 7bad43f34d..5e052e0000 100644
--- a/src/wayland/meta-wayland-shell-surface.c
+++ b/src/wayland/meta-wayland-shell-surface.c
@@ -37,7 +37,6 @@ typedef struct _MetaWaylandShellSurfacePrivate
MetaWindow *window;
gulong unmanaging_handler_id;
- gulong effects_completed_handler_id;
} MetaWaylandShellSurfacePrivate;
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaWaylandShellSurface,
@@ -106,8 +105,6 @@ clear_window (MetaWaylandShellSurface *shell_surface)
g_clear_signal_handler (&priv->unmanaging_handler_id,
priv->window);
- g_clear_signal_handler (&priv->effects_completed_handler_id,
- meta_window_actor_from_window (priv->window));
priv->window = NULL;
surface_actor = meta_wayland_surface_get_actor (surface);
@@ -124,13 +121,6 @@ window_unmanaging (MetaWindow *window,
clear_window (shell_surface);
}
-static void
-window_actor_effects_completed (MetaWindowActor *window_actor,
- MetaWaylandSurface *surface)
-{
- meta_wayland_compositor_repick (surface->compositor);
-}
-
void
meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
MetaWindow *window)
@@ -156,11 +146,6 @@ meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
"unmanaging",
G_CALLBACK (window_unmanaging),
shell_surface);
- priv->effects_completed_handler_id =
- g_signal_connect (meta_window_actor_from_window (window),
- "effects-completed",
- G_CALLBACK (window_actor_effects_completed),
- surface);
meta_window_update_monitor (window, META_WINDOW_UPDATE_MONITOR_FLAGS_NONE);
}
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index a868c3eaa5..7da43d911c 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -131,12 +131,6 @@ meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
meta_wayland_seat_set_input_focus (compositor->seat, surface);
}
-void
-meta_wayland_compositor_repick (MetaWaylandCompositor *compositor)
-{
- meta_wayland_seat_repick (compositor->seat);
-}
-
static void
wl_compositor_create_surface (struct wl_client *client,
struct wl_resource *resource,
diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h
index 3549fb2d5b..e59bb97bc4 100644
--- a/src/wayland/meta-wayland.h
+++ b/src/wayland/meta-wayland.h
@@ -55,8 +55,6 @@ void meta_wayland_compositor_update_key_state (MetaWaylandCom
int key_vector_len,
int offset);
-void meta_wayland_compositor_repick (MetaWaylandCompositor *compositor);
-
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
MetaWindow *window);
diff --git a/src/wayland/meta-xwayland-surface.c b/src/wayland/meta-xwayland-surface.c
index 11f5801272..4697c9d211 100644
--- a/src/wayland/meta-xwayland-surface.c
+++ b/src/wayland/meta-xwayland-surface.c
@@ -44,7 +44,6 @@ struct _MetaXwaylandSurface
MetaWindow *window;
gulong unmanaging_handler_id;
- gulong effects_completed_handler_id;
};
G_DEFINE_TYPE (MetaXwaylandSurface,
@@ -58,7 +57,6 @@ clear_window (MetaXwaylandSurface *xwayland_surface)
META_WAYLAND_SURFACE_ROLE (xwayland_surface);
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
- MetaWindowActor *window_actor;
MetaSurfaceActor *surface_actor;
if (!xwayland_surface->window)
@@ -67,10 +65,6 @@ clear_window (MetaXwaylandSurface *xwayland_surface)
g_clear_signal_handler (&xwayland_surface->unmanaging_handler_id,
xwayland_surface->window);
- window_actor = meta_window_actor_from_window (xwayland_surface->window);
- g_clear_signal_handler (&xwayland_surface->effects_completed_handler_id,
- window_actor);
-
xwayland_surface->window->surface = NULL;
xwayland_surface->window = NULL;
@@ -88,13 +82,6 @@ window_unmanaging (MetaWindow *window,
clear_window (xwayland_surface);
}
-static void
-window_actor_effects_completed (MetaWindowActor *window_actor,
- MetaWaylandSurface *surface)
-{
- meta_wayland_compositor_repick (surface->compositor);
-}
-
void
meta_xwayland_surface_associate_with_window (MetaXwaylandSurface *xwayland_surface,
MetaWindow *window)
@@ -131,11 +118,6 @@ meta_xwayland_surface_associate_with_window (MetaXwaylandSurface *xwayland_surfa
"unmanaging",
G_CALLBACK (window_unmanaging),
xwayland_surface);
- xwayland_surface->effects_completed_handler_id =
- g_signal_connect (meta_window_actor_from_window (window),
- "effects-completed",
- G_CALLBACK (window_actor_effects_completed),
- surface);
g_signal_emit (xwayland_surface, signals[WINDOW_ASSOCIATED], 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]