mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
wayland: Move appears-focused changed handling to window-wayland
This commit is contained in:
parent
91f35d6a01
commit
c49c37999c
@ -4892,14 +4892,6 @@ meta_window_appears_focused_changed (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
meta_frame_queue_draw (window->frame);
|
meta_frame_queue_draw (window->frame);
|
||||||
|
|
||||||
if (window->surface)
|
|
||||||
{
|
|
||||||
if (meta_window_appears_focused (window))
|
|
||||||
meta_wayland_surface_activated (window->surface);
|
|
||||||
else
|
|
||||||
meta_wayland_surface_deactivated (window->surface);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,8 +186,30 @@ meta_window_wayland_move_resize_internal (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_wayland_init (MetaWindowWayland *window_wayland)
|
appears_focused_changed (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
MetaWindow *window = META_WINDOW (object);
|
||||||
|
|
||||||
|
/* When we're unmanaging, we remove focus from the window,
|
||||||
|
* causing this to fire. Don't do anything in that case. */
|
||||||
|
if (window->unmanaging)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (meta_window_appears_focused (window))
|
||||||
|
meta_wayland_surface_activated (window->surface);
|
||||||
|
else
|
||||||
|
meta_wayland_surface_deactivated (window->surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_wayland_init (MetaWindowWayland *wl_window)
|
||||||
|
{
|
||||||
|
MetaWindow *window = META_WINDOW (wl_window);
|
||||||
|
|
||||||
|
g_signal_connect (window, "notify::appears-focused",
|
||||||
|
G_CALLBACK (appears_focused_changed), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user