int row_current;
int column_current;
+
+ bool mod_pressed;
+ bool mod_invalid;
} exposay;
uint32_t binding_modifier;
uint32_t mods_depressed, uint32_t mods_latched,
uint32_t mods_locked, uint32_t group)
{
+ struct desktop_shell *shell =
+ container_of(grab, struct desktop_shell, exposay.grab_kbd);
+ struct weston_seat *seat = (struct weston_seat *) grab->keyboard->seat;
+
+ /* We want to know when mod has been pressed and released.
+ * FIXME: There is a problem here: if mod is pressed, then a key
+ * is pressed and released, then mod is released, we will treat that
+ * as if only mod had been pressed and released. */
+ if (seat->modifier_state) {
+ if (seat->modifier_state == shell->binding_modifier) {
+ shell->exposay.mod_pressed = true;
+ } else {
+ shell->exposay.mod_invalid = true;
+ }
+ } else {
+ if (shell->exposay.mod_pressed && !shell->exposay.mod_invalid)
+ exposay_set_state(shell, EXPOSAY_TARGET_CANCEL, seat);
+
+ shell->exposay.mod_invalid = false;
+ shell->exposay.mod_pressed = false;
+ }
+
+ return;
}
static void
{
struct desktop_shell *shell = data;
- if (shell->exposay.state_target == EXPOSAY_TARGET_OVERVIEW)
- exposay_set_state(shell, EXPOSAY_TARGET_CANCEL, seat);
- else
- exposay_set_state(shell, EXPOSAY_TARGET_OVERVIEW, seat);
+ exposay_set_state(shell, EXPOSAY_TARGET_OVERVIEW, seat);
}
static void