Skip to content
Browse files

code cleanup for a little less CPU usage

  • Loading branch information...
1 parent 3734038 commit 6fdb15354854b16d8dd6d658c1e08c42aa8d7ab0 @Cobinja Cobinja committed Sep 27, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/st/st-widget.c
View
10 src/st/st-widget.c
@@ -1899,12 +1899,12 @@ st_widget_sync_hover (StWidget *widget)
ClutterDeviceManager *device_manager;
ClutterInputDevice *pointer;
ClutterActor *pointer_actor;
-
- device_manager = clutter_device_manager_get_default ();
- pointer = clutter_device_manager_get_core_device (device_manager,
- CLUTTER_POINTER_DEVICE);
- pointer_actor = clutter_input_device_get_pointer_actor (pointer);
+
if (widget->priv->track_hover) {
+ device_manager = clutter_device_manager_get_default ();
+ pointer = clutter_device_manager_get_core_device (device_manager,
+ CLUTTER_POINTER_DEVICE);
+ pointer_actor = clutter_input_device_get_pointer_actor (pointer);
if (pointer_actor)
st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
else

0 comments on commit 6fdb153

Please sign in to comment.
Something went wrong with that request. Please try again.