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>
dev
Jonas Ådahl 10 years ago
parent 4a1b9a995e
commit cbfde13859
  1. 15
      clients/confine.c

@ -301,6 +301,10 @@ key_handler(struct window *window, struct input *input, uint32_t time,
confine->buffer = NULL; confine->buffer = NULL;
window_schedule_redraw(confine->window); window_schedule_redraw(confine->window);
break; 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; confine->reset = 1;
if (confine->complex_confine_region_enabled) if (confine->complex_confine_region_enabled) {
confine->complex_confine_region_dirty = true; 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 static void

Loading…
Cancel
Save