Comment 0 for bug 941956

Revision history for this message
Edward Hennessy (ehennes) wrote :

There is a problem with the clipboard paste operation when using the new Ubuntu
style menus in 10.10. The menus are at the top of the screen instead of the top
of the window. When selecting the paste operation from the drop down menu, the
operation will fail if the cursor is outside the schematic window. If the window
is positioned under the drop down menu, so that when the cursor lies within
the window when the paste operation is selected, the operation will succeed. In
older versions with the menu at the top of the window, the cursor would always
fall within the extents of the window and succeed.

In the system-gschemrc file, the paste operation always calls the hotkey version:

           (,(N_ "_Copy") clipboard-copy clipboard-copy "gtk-copy")
           (,(N_ "_Paste") clipboard-paste-hotkey clipboard-paste-hotkey "gtk-paste")
           (,(N_ "_Delete") edit-delete edit-delete "gtk-delete" )

In the hotkey paste operation, inside file i_callbacks.c in function
DEFINE_I_CALLBACK(clipboard_paste_hotkey), the function abandons the operation
if the cursor is outside the extents of the window:

  g_return_if_fail (w_current != NULL);

  if (!x_event_get_pointer_position (w_current, TRUE, &wx, &wy))
    return;

  object_list = x_clipboard_get (w_current);

I changed the clipboard-paste-hotkey to just clipboard-paste for the menu and it
seems to work, but requires an extra click inside the window for the initial position
of the item to paste.