diff options
author | Gerd Kohlberger <gerdk@svn.gnome.org> | 2008-06-02 03:42:05 +0000 |
---|---|---|
committer | Gerd Kohlberger <gerdk@src.gnome.org> | 2008-06-02 03:42:05 +0000 |
commit | f38ce04444edcba89770f61e29f0d36a5f9d9481 (patch) | |
tree | 77eb91f81bf30b7808faaa862b9b23610be7a5db /plugins/mouse | |
parent | acdda63b3906cc542eb441a54ac8ea7d674485ca (diff) | |
download | gnome-settings-daemon-f38ce04444edcba89770f61e29f0d36a5f9d9481.tar.gz |
Keep animation centered below pointer. Bug #531665
2008-06-02 Gerd Kohlberger <gerdk@svn.gnome.org>
* plugins/mouse/gsd-locate-pointer.c: (timeline_frame_cb):
Keep animation centered below pointer. Bug #531665
svn path=/trunk/; revision=361
Diffstat (limited to 'plugins/mouse')
-rw-r--r-- | plugins/mouse/gsd-locate-pointer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mouse/gsd-locate-pointer.c b/plugins/mouse/gsd-locate-pointer.c index 65f3dc9e..3d61cad4 100644 --- a/plugins/mouse/gsd-locate-pointer.c +++ b/plugins/mouse/gsd-locate-pointer.c @@ -153,6 +153,8 @@ timeline_frame_cb (GsdTimeline *timeline, gpointer user_data) { GsdLocatePointerData *data = (GsdLocatePointerData *) user_data; + GdkScreen *screen; + gint cursor_x, cursor_y; if (gtk_widget_is_composited (data->widget)) { @@ -165,6 +167,13 @@ timeline_frame_cb (GsdTimeline *timeline, gdk_window_invalidate_rect (data->window, NULL, FALSE); data->progress += CIRCLES_PROGRESS_INTERVAL; } + + screen = gdk_drawable_get_screen (data->window); + gdk_window_get_pointer (gdk_screen_get_root_window (screen), + &cursor_x, &cursor_y, NULL); + gdk_window_move (data->window, + cursor_x - WINDOW_SIZE / 2, + cursor_y - WINDOW_SIZE / 2); } static void |