Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview/ev-annotation-window.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-07-25 16:51:29 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-07-25 16:51:29 (GMT)
commitc1ce81fc578513db7994cabf1663c2653af86a2b (patch)
tree1b559a4e73e752334d3cdee1df3708eec2432229 /libview/ev-annotation-window.c
parente97dcfa3042280923d58ac036d02aebcc2e22d5e (diff)
[libview] Fix position of window annotations when moved by the user
Diffstat (limited to 'libview/ev-annotation-window.c')
-rw-r--r--libview/ev-annotation-window.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libview/ev-annotation-window.c b/libview/ev-annotation-window.c
index 749d1a0..6539fd4 100644
--- a/libview/ev-annotation-window.c
+++ b/libview/ev-annotation-window.c
@@ -489,8 +489,12 @@ ev_annotation_window_focus_in_event (GtkWidget *widget,
EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
if (window->in_move) {
- window->orig_x = window->x;
- window->orig_y = window->y;
+ if (window->orig_x != window->x || window->orig_y != window->y) {
+ window->orig_x = window->x;
+ window->orig_y = window->y;
+ g_signal_emit (window, signals[MOVED], 0, window->x, window->y);
+ }
+ window->in_move = FALSE;
}
return FALSE;
@@ -502,12 +506,6 @@ ev_annotation_window_focus_out_event (GtkWidget *widget,
{
EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
- if (window->in_move &&
- (window->orig_x != window->x || window->orig_y != window->y)) {
- window->in_move = FALSE;
- g_signal_emit (window, signals[MOVED], 0, window->x, window->y);
- }
-
ev_annotation_window_sync_contents (window);
return FALSE;