X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=lib%2Fev-tooltip.c;h=f66f22f53f4ad831dc490be294905283d6b74c7a;hb=f4e6041a84c4a0dd4a9c1bab758c9bef43c0b222;hp=ce8158c19f15526b0d534bf54f2a022eacf4c81d;hpb=02291c7a30eed2a32470219909c8cb96735f8f27;p=evince.git diff --git a/lib/ev-tooltip.c b/lib/ev-tooltip.c index ce8158c1..f66f22f5 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