- _gtk_text_handle_get_size (handle, &width, NULL);
- gdk_window_get_root_coords (handle_window->window,
- width / 2, 0, &x, &y);
+ x = handle_window->pointing_to.x;
+ y = handle_window->pointing_to.y;
+ _gtk_text_handle_get_size (handle, &width, &height);
+
+ if (pos != GTK_TEXT_HANDLE_POSITION_CURSOR)
+ y -= height;
+
+ height += handle_window->pointing_to.height;
+ x -= width / 2;
+
+ gdk_window_move_resize (handle_window->window, x, y, width, height);
+ gdk_window_show (handle_window->window);