wayland: Tie activate / deactivate to appears-focused
... rather than actual focus. This makes things behave better.
This commit is contained in:
parent
374e30043b
commit
7615d17293
@ -6360,6 +6360,14 @@ meta_window_appears_focused_changed (MetaWindow *window)
|
||||
|
||||
if (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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -542,8 +542,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
serial = wl_display_next_serial (display);
|
||||
wl_keyboard_send_leave (resource, serial, keyboard->focus_surface->resource);
|
||||
|
||||
meta_wayland_surface_deactivated (keyboard->focus_surface);
|
||||
}
|
||||
|
||||
wl_list_remove (&keyboard->focus_resource_listener.link);
|
||||
@ -584,8 +582,6 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
&keyboard->keys);
|
||||
}
|
||||
|
||||
meta_wayland_surface_activated (surface);
|
||||
|
||||
keyboard->focus_resource = resource;
|
||||
keyboard->focus_surface = surface;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user