After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771046 - Cut & paste no longer works between desktop and window
Cut & paste no longer works between desktop and window
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Cut Copy Paste Undo
3.21.x
Other Linux
: Normal normal
: 3.22
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-08 09:32 UTC by Christoph Reiter (lazka)
Modified: 2016-09-30 07:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clipboard: rework clipboard handling (57.30 KB, patch)
2016-09-29 20:32 UTC, Carlos Soriano
none Details | Review
general: rework clipboard handling (57.30 KB, patch)
2016-09-29 20:32 UTC, Carlos Soriano
committed Details | Review

Description Christoph Reiter (lazka) 2016-09-08 09:32:19 UTC
nautilus 3.21.91.1

Might be that things are still in flux in debian atm. I had to start nautilus-desktop manually to get my desktop back after the nautilus beta update.

1) Create a folder on the desktop
2) ctrl+x
3) open some folder
4) xtrl+v

Expected:

The folder gets moved there

Actual:

The folder gets copied; the source stays around.

The same happens the other way around.
Comment 1 Christoph Reiter (lazka) 2016-09-08 09:33:16 UTC
Oops, filed with the wrong product -> nautilus
Comment 2 Carlos Soriano 2016-09-08 11:17:24 UTC
Yes, it's the only drawback of the desktop split as far as I know.

I will explain the problem:
When dnd, we only mark for moving if it's in the same filesystem. In all other cases we just copy.
Here, the same code path is reached, and since the desktop and nautilus are in different binary now the cache is not the same for both, so when checking the filesystem of the copied files we don't have the information ready, so we detect it as a different filesystem and therefore we just copy.
Comment 3 Carlos Soriano 2016-09-08 11:33:07 UTC
let's keep an eye for 3.22...
Comment 4 Carlos Soriano 2016-09-08 11:33:57 UTC
And you shouldn't need to run manually nautilus-desktop. That's done automatically by the desktop file.
Comment 5 Carlos Soriano 2016-09-29 20:32:22 UTC
Created attachment 336544 [details] [review]
clipboard: rework clipboard handling

We were using a custom clipboard monitor, due to some old behaviour
in 2004 where not all X servers supported XFIXES, which allows to
monitor global clipboard changes between processes, which are needed in
Nautilus for copy, paste and link operations, and their availability
check.
Since Nautilus was a single process, it was working for most of the
time.

However recently we split the desktop in a different process, so we
were not able to correctly set the GDK action for clipboard, since
we were relying on sharing the same clipboard in the same process.

In order to fix this, this patch reworks the clipboard handling to a
more modern way, using the owner-changed signal present in XFIXES.
This fixes the clipboard changing between the desktop and Nautilus
and interproccess clipboard handling, fixes small corner cases, and
in the way this patch makes the code design and ownership of clipboard
more clearer.
Comment 6 Carlos Soriano 2016-09-29 20:32:50 UTC
Created attachment 336545 [details] [review]
general: rework clipboard handling

We were using a custom clipboard monitor, due to some old behaviour
in 2004 where not all X servers supported XFIXES, which allows to
monitor global clipboard changes between processes, which are needed in
Nautilus for copy, paste and link operations, and their availability
check.
Since Nautilus was a single process, it was working for most of the
time.

However recently we split the desktop in a different process, so we
were not able to correctly set the GDK action for clipboard, since
we were relying on sharing the same clipboard in the same process.

In order to fix this, this patch reworks the clipboard handling to a
more modern way, using the owner-changed signal present in XFIXES.
This fixes the clipboard changing between the desktop and Nautilus
and interproccess clipboard handling, fixes small corner cases, and
in the way this patch makes the code design and ownership of clipboard
more clearer.
Comment 7 Carlos Soriano 2016-09-29 20:34:54 UTC
The issue was not the same dnd code path, but similar. So we coulf fix this one through reworking the clipboard handling of Nautilus

Attachment 336545 [details] pushed as 55cf522 - general: rework clipboard handling
Comment 8 Christoph Reiter (lazka) 2016-09-30 07:35:37 UTC
Thanks!