diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-09-08 09:22:47 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-09-08 09:22:47 (GMT) |
commit | c9b59f59087e4a65eb67a93dbbae5b5589dc0fd8 (patch) | |
tree | 7984bf433c937f89c3b51045d2b498d982f5c07d /lib | |
parent | 02291c7a30eed2a32470219909c8cb96735f8f27 (diff) |
Add some space from the cursor, hardcoded but I couldnt find a better way.
2005-09-08 Marco Pesenti Gritti <mpg@redhat.com>
* lib/ev-tooltip.c: (ev_tooltip_set_position):
Add some space from the cursor, hardcoded but I couldnt
find a better way.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ev-tooltip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ev-tooltip.c b/lib/ev-tooltip.c index ce8158c..f66f22f 100644 --- a/lib/ev-tooltip.c +++ b/lib/ev-tooltip.c @@ -31,6 +31,7 @@ #define DEFAULT_DELAY 500 #define STICKY_DELAY 500 #define STICKY_REVERT_DELAY 1000 +#define SPACE_FROM_CURSOR 10 struct _EvTooltipPrivate { GtkWidget *label; @@ -128,13 +129,15 @@ ev_tooltip_set_text (EvTooltip *tooltip, const char *text) void ev_tooltip_set_position (EvTooltip *tooltip, int x, int y) { - int root_x = 0, root_y = 0; + int root_x, root_y; if (tooltip->parent != NULL) { gdk_window_get_origin (tooltip->parent->window, &root_x, &root_y); } - gtk_window_move (GTK_WINDOW (tooltip), x + root_x, y + root_y); + gtk_window_move (GTK_WINDOW (tooltip), + x + root_x + SPACE_FROM_CURSOR, + y + root_y + SPACE_FROM_CURSOR); } static gboolean |