mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 00:05:32 +00:00
clients/confine: Toggle maximized state with 'm'
In order to test warping when pointer confinemen region changes, add key binding to the maximized state without using the mouse. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
4a1b9a995e
commit
cbfde13859
|
@ -301,6 +301,10 @@ key_handler(struct window *window, struct input *input, uint32_t time,
|
|||
confine->buffer = NULL;
|
||||
window_schedule_redraw(confine->window);
|
||||
break;
|
||||
case XKB_KEY_m:
|
||||
window_set_maximized(confine->window,
|
||||
!window_is_maximized(window));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,8 +383,17 @@ resize_handler(struct widget *widget,
|
|||
|
||||
confine->reset = 1;
|
||||
|
||||
if (confine->complex_confine_region_enabled)
|
||||
if (confine->complex_confine_region_enabled) {
|
||||
confine->complex_confine_region_dirty = true;
|
||||
|
||||
if (confine->pointer_confined) {
|
||||
calculate_complex_confine_region(confine);
|
||||
window_update_confine_rectangles(
|
||||
confine->window,
|
||||
confine->complex_confine_region,
|
||||
NUM_COMPLEX_REGION_RECTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue