Ticket #4165: abiword-set-both-handles-below-baseline.diff

File abiword-set-both-handles-below-baseline.diff, 1.2 KB (added by garnacho, 10 years ago)

Abiword patch

  • src/text/fmt/gtk/gtktexthandle.c

    diff --git a/src/text/fmt/gtk/gtktexthandle.c b/src/text/fmt/gtk/gtktexthandle.c
    index 6ff0ffa..8957911 100644
    a b fv_text_handle_widget_event (GtkWidget *widget, 
    262262
    263263      x = event->motion.x_root - priv->windows[pos].dx + (width / 2) - x;
    264264      y = event->motion.y_root - priv->windows[pos].dy - y;
    265 
    266       if (pos == FV_TEXT_HANDLE_POSITION_SELECTION_START)
    267         y += height;
    268 
    269265      g_signal_emit (handle, signals[HANDLE_DRAGGED], 0, pos, x, y);
    270266    }
    271267
    _fv_text_handle_update_window_state (FvTextHandle *handle, 
    290286    {
    291287      gint x, y, width, height;
    292288
    293       x = handle_window->pointing_to.x;
    294       y = handle_window->pointing_to.y;
    295289      _fv_text_handle_get_size (handle, &width, &height);
    296 
    297       if (pos == FV_TEXT_HANDLE_POSITION_CURSOR)
    298         y += handle_window->pointing_to.height;
    299       else
    300         y -= height;
    301 
    302       x -= width / 2;
     290      x = handle_window->pointing_to.x - (width / 2);
     291      y = handle_window->pointing_to.y + handle_window->pointing_to.height;
    303292
    304293      gdk_window_move_resize (handle_window->window, x, y, width, height);
    305294      gdk_window_show (handle_window->window);