[evince] [libview] Fix position of window annotations when moved by the user
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [libview] Fix position of window annotations when moved by the user
- Date: Sun, 25 Jul 2010 16:52:18 +0000 (UTC)
commit c1ce81fc578513db7994cabf1663c2653af86a2b
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Jul 25 18:51:29 2010 +0200
[libview] Fix position of window annotations when moved by the user
libview/ev-annotation-window.c | 14 ++++++--------
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]