mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Move ping to be a vfunc
This commit is contained in:
parent
9debd2fb0d
commit
14f424cd02
@ -4701,12 +4701,7 @@ meta_display_ping_window (MetaWindow *window,
|
||||
"Sending ping with timestamp %u to window %s\n",
|
||||
timestamp, window->desc);
|
||||
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||
meta_window_send_icccm_message (window,
|
||||
display->atom__NET_WM_PING,
|
||||
timestamp);
|
||||
else
|
||||
meta_wayland_surface_ping (window->surface, timestamp);
|
||||
META_WINDOW_GET_CLASS (window)->ping (window, timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -471,6 +471,8 @@ struct _MetaWindowClass
|
||||
|
||||
void (*manage) (MetaWindow *window);
|
||||
void (*unmanage) (MetaWindow *window);
|
||||
void (*ping) (MetaWindow *window,
|
||||
guint32 serial);
|
||||
void (*delete) (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
void (*kill) (MetaWindow *window);
|
||||
|
@ -75,6 +75,13 @@ meta_window_wayland_unmanage (MetaWindow *window)
|
||||
meta_display_unregister_wayland_window (window->display, window);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_wayland_ping (MetaWindow *window,
|
||||
guint32 serial)
|
||||
{
|
||||
meta_wayland_surface_ping (window->surface, serial);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_wayland_delete (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
@ -189,6 +196,7 @@ meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
|
||||
|
||||
window_class->manage = meta_window_wayland_manage;
|
||||
window_class->unmanage = meta_window_wayland_unmanage;
|
||||
window_class->ping = meta_window_wayland_ping;
|
||||
window_class->delete = meta_window_wayland_delete;
|
||||
window_class->kill = meta_window_wayland_kill;
|
||||
window_class->move_resize_internal = meta_window_wayland_move_resize_internal;
|
||||
|
@ -322,6 +322,17 @@ meta_window_x11_unmanage (MetaWindow *window)
|
||||
meta_error_trap_pop (window->display);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_x11_ping (MetaWindow *window,
|
||||
guint32 serial)
|
||||
{
|
||||
MetaDisplay *display = window->display;
|
||||
|
||||
meta_window_send_icccm_message (window,
|
||||
display->atom__NET_WM_PING,
|
||||
serial);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_x11_delete (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
@ -797,6 +808,7 @@ meta_window_x11_class_init (MetaWindowX11Class *klass)
|
||||
|
||||
window_class->manage = meta_window_x11_manage;
|
||||
window_class->unmanage = meta_window_x11_unmanage;
|
||||
window_class->ping = meta_window_x11_ping;
|
||||
window_class->delete = meta_window_x11_delete;
|
||||
window_class->kill = meta_window_x11_kill;
|
||||
window_class->move_resize_internal = meta_window_x11_move_resize_internal;
|
||||
|
Loading…
Reference in New Issue
Block a user