stage: Remove tracking input devices, it's not used
https://bugzilla.gnome.org/show_bug.cgi?id=683126
This commit is contained in:
parent
fd375a7bc9
commit
d5332d1e4c
@ -2679,7 +2679,7 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
|
||||
if (event->type == CLUTTER_TOUCH_BEGIN)
|
||||
{
|
||||
_clutter_stage_add_device (CLUTTER_STAGE (stage), device);
|
||||
_clutter_input_device_set_stage (device, CLUTTER_STAGE (stage));
|
||||
_clutter_input_device_add_sequence (device, sequence);
|
||||
}
|
||||
|
||||
@ -2717,7 +2717,7 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
|
||||
if (event->type == CLUTTER_TOUCH_END)
|
||||
{
|
||||
_clutter_stage_remove_device (CLUTTER_STAGE (stage), device);
|
||||
_clutter_input_device_set_stage (device, NULL);
|
||||
_clutter_input_device_remove_sequence (device, sequence);
|
||||
}
|
||||
|
||||
|
@ -85,13 +85,6 @@ ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (Clut
|
||||
ClutterPaintVolume *clip);
|
||||
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
|
||||
|
||||
void _clutter_stage_add_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device);
|
||||
void _clutter_stage_remove_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device);
|
||||
gboolean _clutter_stage_has_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device);
|
||||
|
||||
CoglFramebuffer *_clutter_stage_get_active_framebuffer (ClutterStage *stage);
|
||||
|
||||
gint32 _clutter_stage_acquire_pick_id (ClutterStage *stage,
|
||||
|
@ -145,8 +145,6 @@ struct _ClutterStagePrivate
|
||||
|
||||
CoglFramebuffer *active_framebuffer;
|
||||
|
||||
GHashTable *devices;
|
||||
|
||||
GTimer *fps_timer;
|
||||
gint32 timer_n_frames;
|
||||
|
||||
@ -1843,8 +1841,6 @@ clutter_stage_finalize (GObject *object)
|
||||
|
||||
g_array_free (priv->paint_volume_stack, TRUE);
|
||||
|
||||
g_hash_table_destroy (priv->devices);
|
||||
|
||||
_clutter_id_pool_free (priv->pick_id_pool);
|
||||
|
||||
if (priv->fps_timer != NULL)
|
||||
@ -2309,8 +2305,6 @@ clutter_stage_init (ClutterStage *self)
|
||||
priv->paint_volume_stack =
|
||||
g_array_new (FALSE, FALSE, sizeof (ClutterPaintVolume));
|
||||
|
||||
priv->devices = g_hash_table_new (NULL, NULL);
|
||||
|
||||
priv->pick_id_pool = _clutter_id_pool_new (256);
|
||||
}
|
||||
|
||||
@ -4161,38 +4155,6 @@ clutter_stage_get_accept_focus (ClutterStage *stage)
|
||||
return stage->priv->accept_focus;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_add_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
|
||||
if (g_hash_table_lookup (priv->devices, device) != NULL)
|
||||
return;
|
||||
|
||||
g_hash_table_insert (priv->devices, device, GINT_TO_POINTER (1));
|
||||
_clutter_input_device_set_stage (device, stage);
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_remove_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
|
||||
_clutter_input_device_set_stage (device, NULL);
|
||||
g_hash_table_remove (priv->devices, device);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_stage_has_device (ClutterStage *stage,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
|
||||
return g_hash_table_lookup (priv->devices, device) != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_stage_set_motion_events_enabled:
|
||||
* @stage: a #ClutterStage
|
||||
|
@ -219,9 +219,9 @@ clutter_gdk_handle_event (GdkEvent *gdk_event)
|
||||
clutter_event_set_device (event, device);
|
||||
clutter_event_set_source_device (event, source_device);
|
||||
if (gdk_event->type == GDK_ENTER_NOTIFY)
|
||||
_clutter_stage_add_device (stage, clutter_event_get_device (event));
|
||||
_clutter_input_device_set_stage (clutter_event_get_device (event), stage);
|
||||
else
|
||||
_clutter_stage_remove_device (stage, clutter_event_get_device (event));
|
||||
_clutter_input_device_set_stage (clutter_event_get_device (event), NULL);
|
||||
CLUTTER_NOTE (EVENT, "Crossing %s [%.2f, %.2f]",
|
||||
event->type == CLUTTER_ENTER ? "enter" : "leave",
|
||||
event->crossing.x,
|
||||
|
@ -371,7 +371,7 @@ clutter_event_osx_translate (NSEvent *nsevent,
|
||||
event->crossing.source = CLUTTER_ACTOR (stage);
|
||||
clutter_event_set_device (event, manager_osx->core_pointer);
|
||||
|
||||
_clutter_stage_add_device (stage, manager_osx->core_pointer);
|
||||
_clutter_input_device_set_stage (manager_osx->core_pointer, stage);
|
||||
|
||||
CLUTTER_NOTE (EVENT, "enter at %f,%f",
|
||||
event->crossing.x, event->crossing.y);
|
||||
@ -385,7 +385,7 @@ clutter_event_osx_translate (NSEvent *nsevent,
|
||||
event->crossing.source = CLUTTER_ACTOR (stage);
|
||||
clutter_event_set_device (event, manager_osx->core_pointer);
|
||||
|
||||
_clutter_stage_remove_device (stage, manager_osx->core_pointer);
|
||||
_clutter_input_device_set_stage (manager_osx->core_pointer, NULL);
|
||||
|
||||
CLUTTER_NOTE (EVENT, "exit at %f,%f",
|
||||
event->crossing.x, event->crossing.y);
|
||||
|
@ -571,7 +571,7 @@ clutter_win32_handle_event (const MSG *msg)
|
||||
clutter_event_set_device (event, core_pointer);
|
||||
|
||||
/* we entered the stage */
|
||||
_clutter_stage_add_device (stage, core_pointer);
|
||||
_clutter_input_device_set_stage (core_pointer, stage);
|
||||
|
||||
take_and_queue_event (crossing);
|
||||
|
||||
@ -596,7 +596,7 @@ clutter_win32_handle_event (const MSG *msg)
|
||||
clutter_event_set_device (event, core_pointer);
|
||||
|
||||
/* we left the stage */
|
||||
_clutter_stage_remove_device (stage, core_pointer);
|
||||
_clutter_input_device_set_stage (core_pointer, NULL);
|
||||
|
||||
/* When we get a leave message the mouse tracking is
|
||||
automatically cancelled so we'll need to start it again when
|
||||
|
@ -488,7 +488,7 @@ clutter_device_manager_x11_translate_event (ClutterEventTranslator *translator,
|
||||
event->crossing.related = NULL;
|
||||
clutter_event_set_device (event, manager_x11->core_pointer);
|
||||
|
||||
_clutter_stage_add_device (stage, manager_x11->core_pointer);
|
||||
_clutter_input_device_set_stage (manager_x11->core_pointer, stage);
|
||||
|
||||
res = CLUTTER_TRANSLATE_QUEUE;
|
||||
break;
|
||||
@ -514,7 +514,7 @@ clutter_device_manager_x11_translate_event (ClutterEventTranslator *translator,
|
||||
event->crossing.related = NULL;
|
||||
clutter_event_set_device (event, manager_x11->core_pointer);
|
||||
|
||||
_clutter_stage_remove_device (stage, manager_x11->core_pointer);
|
||||
_clutter_input_device_set_stage (manager_x11->core_pointer, NULL);
|
||||
|
||||
res = CLUTTER_TRANSLATE_QUEUE;
|
||||
break;
|
||||
|
@ -1185,7 +1185,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
||||
event->crossing.x = xev->event_x;
|
||||
event->crossing.y = xev->event_y;
|
||||
|
||||
_clutter_stage_add_device (stage, device);
|
||||
_clutter_input_device_set_stage (device, stage);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1209,7 +1209,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
||||
event->crossing.x = xev->event_x;
|
||||
event->crossing.y = xev->event_y;
|
||||
|
||||
_clutter_stage_remove_device (stage, device);
|
||||
_clutter_input_device_set_stage (device, NULL);
|
||||
}
|
||||
|
||||
_clutter_input_device_reset_scroll_info (source_device);
|
||||
|
Loading…
x
Reference in New Issue
Block a user