compositor: Remove redundant and not well-defined focus field
It was never clear what this field really did.
This commit is contained in:
parent
2e611264a3
commit
10ddd97ecf
@ -2364,7 +2364,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
|
||||
if (ec->base.session_active) {
|
||||
weston_log("activating session\n");
|
||||
compositor->focus = 1;
|
||||
compositor->state = ec->prev_state;
|
||||
drm_compositor_set_modes(ec);
|
||||
weston_compositor_damage_all(compositor);
|
||||
@ -2373,7 +2372,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
weston_log("deactivating session\n");
|
||||
udev_input_disable(&ec->input);
|
||||
|
||||
compositor->focus = 0;
|
||||
ec->prev_state = compositor->state;
|
||||
weston_compositor_offscreen(compositor);
|
||||
|
||||
@ -2672,8 +2670,6 @@ drm_compositor_create(struct wl_display *display,
|
||||
ec->base.destroy = drm_destroy;
|
||||
ec->base.restore = drm_restore;
|
||||
|
||||
ec->base.focus = 1;
|
||||
|
||||
ec->prev_state = WESTON_COMPOSITOR_ACTIVE;
|
||||
|
||||
for (key = KEY_F1; key < KEY_F9; key++)
|
||||
|
@ -816,7 +816,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
|
||||
if (compositor->base.session_active) {
|
||||
weston_log("entering VT\n");
|
||||
compositor->base.focus = 1;
|
||||
compositor->base.state = compositor->prev_state;
|
||||
|
||||
wl_list_for_each(output, &compositor->base.output_list, link) {
|
||||
@ -834,7 +833,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
fbdev_output_disable(output);
|
||||
}
|
||||
|
||||
compositor->base.focus = 0;
|
||||
compositor->prev_state = compositor->base.state;
|
||||
weston_compositor_offscreen(&compositor->base);
|
||||
|
||||
@ -906,7 +904,6 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
||||
compositor->base.destroy = fbdev_compositor_destroy;
|
||||
compositor->base.restore = fbdev_restore;
|
||||
|
||||
compositor->base.focus = 1;
|
||||
compositor->prev_state = WESTON_COMPOSITOR_ACTIVE;
|
||||
compositor->use_pixman = !param->use_gl;
|
||||
|
||||
|
@ -671,7 +671,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
|
||||
if (compositor->base.session_active) {
|
||||
weston_log("activating session\n");
|
||||
compositor->base.focus = 1;
|
||||
compositor->base.state = compositor->prev_state;
|
||||
weston_compositor_damage_all(&compositor->base);
|
||||
wl_list_for_each(seat, &compositor->base.seat_list, link) {
|
||||
@ -685,7 +684,6 @@ session_notify(struct wl_listener *listener, void *data)
|
||||
evdev_remove_devices(seat);
|
||||
}
|
||||
|
||||
compositor->base.focus = 0;
|
||||
compositor->prev_state = compositor->base.state;
|
||||
weston_compositor_offscreen(&compositor->base);
|
||||
|
||||
@ -762,7 +760,6 @@ rpi_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
||||
compositor->base.destroy = rpi_compositor_destroy;
|
||||
compositor->base.restore = rpi_restore;
|
||||
|
||||
compositor->base.focus = 1;
|
||||
compositor->prev_state = WESTON_COMPOSITOR_ACTIVE;
|
||||
compositor->single_buffer = param->renderer.single_buffer;
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ weston_compositor_repick(struct weston_compositor *compositor)
|
||||
{
|
||||
struct weston_seat *seat;
|
||||
|
||||
if (!compositor->focus)
|
||||
if (!compositor->session_active)
|
||||
return;
|
||||
|
||||
wl_list_for_each(seat, &compositor->seat_list, link)
|
||||
|
@ -591,8 +591,6 @@ struct weston_compositor {
|
||||
struct weston_plane primary_plane;
|
||||
uint32_t capabilities; /* combination of enum weston_capability */
|
||||
|
||||
uint32_t focus;
|
||||
|
||||
struct weston_renderer *renderer;
|
||||
|
||||
pixman_format_code_t read_format;
|
||||
|
@ -400,7 +400,7 @@ evdev_device_data(int fd, uint32_t mask, void *data)
|
||||
int len;
|
||||
|
||||
ec = device->seat->compositor;
|
||||
if (!ec->focus)
|
||||
if (!ec->session_active)
|
||||
return 1;
|
||||
|
||||
/* If the compositor is repainting, this function is called only once
|
||||
|
@ -963,9 +963,7 @@ notify_pointer_focus(struct weston_seat *seat, struct weston_output *output,
|
||||
|
||||
if (output) {
|
||||
move_pointer(seat, x, y);
|
||||
compositor->focus = 1;
|
||||
} else {
|
||||
compositor->focus = 0;
|
||||
/* FIXME: We should call weston_pointer_set_focus(seat,
|
||||
* NULL) here, but somehow that breaks re-entry... */
|
||||
}
|
||||
|
@ -122,8 +122,6 @@ move_pointer(struct wl_client *client, struct wl_resource *resource,
|
||||
struct weston_seat *seat = get_seat(test);
|
||||
struct weston_pointer *pointer = seat->pointer;
|
||||
|
||||
test->compositor->focus = 1;
|
||||
|
||||
notify_motion(seat, 100,
|
||||
wl_fixed_from_int(x) - pointer->x,
|
||||
wl_fixed_from_int(y) - pointer->y);
|
||||
@ -138,8 +136,6 @@ send_button(struct wl_client *client, struct wl_resource *resource,
|
||||
struct weston_test *test = wl_resource_get_user_data(resource);
|
||||
struct weston_seat *seat = get_seat(test);
|
||||
|
||||
test->compositor->focus = 1;
|
||||
|
||||
notify_button(seat, 100, button, state);
|
||||
}
|
||||
|
||||
@ -172,8 +168,6 @@ send_key(struct wl_client *client, struct wl_resource *resource,
|
||||
struct weston_test *test = wl_resource_get_user_data(resource);
|
||||
struct weston_seat *seat = get_seat(test);
|
||||
|
||||
test->compositor->focus = 1;
|
||||
|
||||
notify_key(seat, 100, key, state, STATE_UPDATE_AUTOMATIC);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user