mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05: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
|
* @manager: the #ClutterDeviceManager that emitted the signal
|
||||||
* @device: the core pointer #ClutterInputDevice
|
* @device: the core pointer #ClutterInputDevice
|
||||||
* @timeout_type: the type of timeout #ClutterPointerA11yTimeoutType
|
* @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
|
* The ::ptr-a11y-timeout-stopped signal is emitted when a running
|
||||||
* pointer accessibility timeout delay is stopped, either because
|
* 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_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0, NULL, NULL,
|
0, NULL, NULL,
|
||||||
_clutter_marshal_VOID__OBJECT_FLAGS,
|
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEAN,
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 3,
|
||||||
CLUTTER_TYPE_INPUT_DEVICE,
|
CLUTTER_TYPE_INPUT_DEVICE,
|
||||||
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE);
|
CLUTTER_TYPE_POINTER_A11Y_TIMEOUT_TYPE,
|
||||||
|
G_TYPE_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -171,7 +171,8 @@ trigger_secondary_click (gpointer data)
|
|||||||
g_signal_emit_by_name (device->device_manager,
|
g_signal_emit_by_name (device->device_manager,
|
||||||
"ptr-a11y-timeout-stopped",
|
"ptr-a11y-timeout-stopped",
|
||||||
device,
|
device,
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK);
|
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
@ -202,7 +203,8 @@ stop_secondary_click_timeout (ClutterInputDevice *device)
|
|||||||
g_signal_emit_by_name (device->device_manager,
|
g_signal_emit_by_name (device->device_manager,
|
||||||
"ptr-a11y-timeout-stopped",
|
"ptr-a11y-timeout-stopped",
|
||||||
device,
|
device,
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK);
|
CLUTTER_A11Y_TIMEOUT_TYPE_SECONDARY_CLICK,
|
||||||
|
FALSE);
|
||||||
}
|
}
|
||||||
device->ptr_a11y_data->secondary_click_triggered = 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,
|
g_signal_emit_by_name (device->device_manager,
|
||||||
"ptr-a11y-timeout-stopped",
|
"ptr-a11y-timeout-stopped",
|
||||||
device,
|
device,
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE);
|
CLUTTER_A11Y_TIMEOUT_TYPE_GESTURE,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
@ -469,7 +472,8 @@ trigger_dwell_click (gpointer data)
|
|||||||
g_signal_emit_by_name (device->device_manager,
|
g_signal_emit_by_name (device->device_manager,
|
||||||
"ptr-a11y-timeout-stopped",
|
"ptr-a11y-timeout-stopped",
|
||||||
device,
|
device,
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL);
|
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
if (get_dwell_mode (device) == CLUTTER_A11Y_DWELL_MODE_GESTURE)
|
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,
|
g_signal_emit_by_name (device->device_manager,
|
||||||
"ptr-a11y-timeout-stopped",
|
"ptr-a11y-timeout-stopped",
|
||||||
device,
|
device,
|
||||||
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL);
|
CLUTTER_A11Y_TIMEOUT_TYPE_DWELL,
|
||||||
|
FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ VOID:INT,POINTER
|
|||||||
VOID:FLOAT,FLOAT
|
VOID:FLOAT,FLOAT
|
||||||
VOID:INT,INT,INT,INT
|
VOID:INT,INT,INT,INT
|
||||||
VOID:OBJECT,FLAGS
|
VOID:OBJECT,FLAGS
|
||||||
|
VOID:OBJECT,FLAGS,BOOLEAN
|
||||||
VOID:OBJECT,FLAGS,UINT
|
VOID:OBJECT,FLAGS,UINT
|
||||||
VOID:OBJECT,FLOAT,FLOAT
|
VOID:OBJECT,FLOAT,FLOAT
|
||||||
VOID:OBJECT,FLOAT,FLOAT,FLAGS
|
VOID:OBJECT,FLOAT,FLOAT,FLAGS
|
||||||
|
Loading…
Reference in New Issue
Block a user