mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
clutter/input-pointer-a11y: Include success boolean in stop signals
Add a boolean parameter to the signal to inform the handler whether the timeout completed successfully or not. This allows the shell to gracefully end the pie timer animation and show a success animation when the click happens. https://gitlab.gnome.org/GNOME/mutter/merge_requests/745
This commit is contained in:
parent
78232fa3eb
commit
a51437ee2b
@ -282,6 +282,7 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
||||
* @manager: the #ClutterDeviceManager that emitted the signal
|
||||
* @device: the core pointer #ClutterInputDevice
|
||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
||||
* @clicked: %TRUE if the timeout finished and triggered a click
|
||||
*
|
||||
* The ::ptr-a11y-timeout-stopped signal is emitted when a running
|
||||
* pointer accessibility timeout delay is stopped, either because
|
||||
@ -293,10 +294,11 @@ clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
_clutter_marshal_VOID__OBJECT_FLAGS,
|
||||
G_TYPE_NONE, 2,
|
||||
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEAN,
|
||||
G_TYPE_NONE, 3,
|
||||
CLUTTER_TYPE_INPUT_DEVICE,
|
||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE);
|
||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
||||
G_TYPE_BOOLEAN);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -171,7 +171,8 @@ trigger_secondary_click (gpointer data)
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK);
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
TRUE);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
@ -202,7 +203,8 @@ stop_secondary_click_timeout (ClutterInputDevice *device)
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK);
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||
FALSE);
|
||||
}
|
||||
device->ptr_a11y_data->secondary_click_triggered = FALSE;
|
||||
}
|
||||
@ -438,7 +440,8 @@ trigger_dwell_gesture (gpointer data)
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE);
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
||||
TRUE);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
@ -469,7 +472,8 @@ trigger_dwell_click (gpointer data)
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL);
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
TRUE);
|
||||
|
||||
if (get_dwell_mode (device) == CLUTTER_A11Y_DWELL_MODE_GESTURE)
|
||||
{
|
||||
@ -514,7 +518,8 @@ stop_dwell_timeout (ClutterInputDevice *device)
|
||||
g_signal_emit_by_name (device->device_manager,
|
||||
"ptr-a11y-timeout-stopped",
|
||||
device,
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL);
|
||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ VOID:INT,POINTER
|
||||
VOID:FLOAT,FLOAT
|
||||
VOID:INT,INT,INT,INT
|
||||
VOID:OBJECT,FLAGS
|
||||
VOID:OBJECT,FLAGS,BOOLEAN
|
||||
VOID:OBJECT,FLAGS,UINT
|
||||
VOID:OBJECT,FLOAT,FLOAT
|
||||
VOID:OBJECT,FLOAT,FLOAT,FLAGS
|
||||
|
Loading…
Reference in New Issue
Block a user