! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
1.8.x Regression: right-click drag and drop does not show a context menu on d...
Status:
RESOLVED: MOVED

Comments

Description alexxcons editbugs 2018-08-05 22:44:53 CEST
Created attachment 7865 
screenshot of thunar 1.6.x

In thunar 1.6.x a context menu was shown on drop ( see screenshot )

In thunar 1.8.x this menu does not show any more .. instead the drop is directly executed.

This bug is related to Bug #9625
Comment 1 IMTheNachoMan 2018-08-07 05:43:51 CEST
This bug is still present on Thunar 1.6.15 for me.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"


$ uname -a
Linux desk 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ thunar -V
Thunar 1.6.15 (Xfce 4.12)

Copyright (c) 2004-2015
	The Thunar development team. All rights reserved.

Written by Benedikt Meurer <benny@xfce.org>.

Please report bugs to <http://bugzilla.xfce.org/>.
Comment 2 Gaelan Lloyd 2018-11-02 18:20:15 CET
I noticed the same issue.  When I start to do a right-click drag, the right-click context menu immediately pops up and prevents you from doing the right-click drag.

Arch Linux, up-to-date.  Thunar 1.8.2 (Xfce 4.12)
Comment 3 devicenull2009 2018-12-13 06:54:58 CET
Same problem here.

Thunar 1.8.2 (Xfce 4.12)

(Fedora 29)
Comment 4 Gaelan Lloyd 2018-12-17 17:18:03 CET
Looks like bug 12348 (reported back in 2015) is related.

Starting the right-click drag of files in Thunar works for me too, as long as you start in any column other than "Name."

Thunar 1.8.2 (Xfce 4.12)
Comment 5 devicenull2009 2019-01-14 23:08:40 CET
If the view in Thunar is set as "View as Icons", right click and drag simply copies the file(s) over to the new location. There is no menu displayed when the files are dropped at the destination.

I have also tried the right-click and drag with the view in Thunar set as "View as Detailed List". I still get no menu when I drag and drop at the new location.

xfce4-about-4.13.4-20.fc29.x86_64
libxfce4util-4.13.2-20.fc29.x86_64
libxfce4ui-4.13.4-20.fc29.x86_64
xfce4-panel-4.13.4-1.fc29.x86_64
xfce4-notifyd-0.4.2-20.fc29.x86_64
xfce4-session-4.13.1-20.fc29.x86_64
xfce4-session-engines-4.13.1-20.fc29.x86_64
xfce4-settings-4.13.5-2.fc29.x86_64
Thunar-1.8.2-1.fc29.x86_64
Comment 6 alexxcons editbugs 2019-01-15 21:03:30 CET
*** Bug 12348 has been marked as a duplicate of this bug. ***
Comment 7 Joji Antony 2019-02-07 12:55:37 CET
Same problem for me also

$ Thunar --version
Thunar 1.8.4 (Xfce 4.12)

Copyright (c) 2004-2015
	The Thunar development team. All rights reserved.

Written by Benedikt Meurer <benny@xfce.org>.

Please report bugs to <http://bugzilla.xfce.org/>.
Comment 8 devicenull2009 2019-02-24 07:22:42 CET
Upgraded to Thunar-1.8.4-1.fc29.x86_64 (Fedora 29).

There is now _no_ capability to "right click and drag" from one Thunar window to another.
Comment 9 devicenull2009 2019-03-16 02:55:52 CET
Is there any updated information from the maintainer(s) of Thunar?
Comment 10 Theo Linkspfeifer editbugs 2019-03-28 15:18:55 CET
The code for right-click drag handling was removed [1]. Furthermore, the fuction gdk_drag_context_set_suggested_action() is not available anymore, so a replacement is needed. Maybe changing the code [2] to something like this will work:

action = ((gdk_drag_context_get_actions (context) & GDK_ACTION_ASK) != 0)

Lastly, the context menu popup behavior was changed [3], and that results in thunar_dnd_ask() returning 0 immediately.

---
[1] https://git.xfce.org/xfce/thunar/commit/?id=266f3fbd5f0a40382bac06828922317d1eabf67f
[2] https://git.xfce.org/xfce/thunar/tree/thunar/thunar-standard-view.c?h=thunar-1.8.4#n3471
[3] https://git.xfce.org/xfce/thunar/commit/thunar/thunar-gtk-extensions.c?id=bc74029cea6ea874d0358570ce5d374e60ed86b8
Comment 11 devicenull2009 2019-03-30 09:02:06 CET
Thanks for the information Theo. It's a shame that this feature has been removed. To me it was a useful feature to have. Is it possible to bring it back at all?
Comment 12 Theo Linkspfeifer editbugs 2019-05-12 01:41:35 CEST
Created attachment 8511 
Fix queued context menu popup

I gave it try and somewhat managed to bring the functionality back. The first patch fixes the missing context menu popup which should show up after a small delay while not having started a drag event and not having released the pressed mouse button.

Log output of Thunar 1.8.4:

(thunar:27550): Gtk-WARNING **: 01:28:54.830: no trigger event for menu popup

(thunar:27550): Gtk-CRITICAL **: 01:28:54.831: gtk_menu_popup_at_rect: assertion 'GDK_IS_WINDOW (rect_window)' failed

(thunar:27550): Gdk-CRITICAL **: 01:28:54.831: gdk_event_free: assertion 'event != NULL' failed
Comment 13 Theo Linkspfeifer editbugs 2019-05-12 01:59:11 CEST
Created attachment 8512 
Restore right-click drag and drop functionality

This is the actual patch for this bug report. However, the first patch is required to prevent a glitch (drag or button press events not properly ending).
Comment 14 Theo Linkspfeifer editbugs 2019-05-12 13:16:19 CEST
Created attachment 8513 
Fix queued context menu popup

Added a gdk_event_free() to thunar_standard_view_motion_notify_event().
Comment 15 Theo Linkspfeifer editbugs 2019-05-12 14:56:45 CEST
With the above change I can trigger a segmentation fault in the following scenario:

Drag a file somewhere to an empty space within the same folder and drop it (no file operation). Do it again quickly and immediately close Thunar.
Comment 16 Theo Linkspfeifer editbugs 2019-05-12 22:35:35 CEST
Maybe it would be best to just pop up the context menu on button release, and therefore omit problems. It is the current behavior in 1.8 anyway.

With the timer the popup stays open on button release, but not when it was repositioned due to being to close to a screen border. In 1.6 it disappears in both cases. I do not know which behavior is preferred, but I could not find a way to make it consistent.
Comment 17 alexxcons editbugs 2019-05-13 09:49:05 CEST
Works already fine in icon view ! Support for detailed and compact view needed.

I tried to reproduce the seg.fault, you mentioned above I only suceeded once, getting the following:
(thunar:8849): thunar-CRITICAL **: thunar_folder_finished: assertion 'folder->content_type_idle_id == 0' failed

However here a different Seg.Fault, which I can reproduce reliably:
- Open thunar, switch to icon view
- copy or move some file via right click
- Switch to detailed view
--> Seg. Fault
Comment 18 Theo Linkspfeifer editbugs 2019-05-13 14:52:16 CEST
Does removing the following lines from 8513 resolve the seg fault problems?

  /* be sure to free any pending drag timer event */
  if (G_UNLIKELY (standard_view->priv->drag_timer_event != NULL))
    gdk_event_free (standard_view->priv->drag_timer_event);
Comment 19 Theo Linkspfeifer editbugs 2019-05-14 22:04:11 CEST
The problem described in comment #16 (long button press menu behavior) is present in Nemo also. Therefore, it may be something that could be investigated later.
Comment 20 darkshadow8880@gmail.com 2019-05-16 00:05:35 CEST
sorry guys for asking but is there any change to get a patched thunar  .deb somewhere?
Comment 21 alexxcons editbugs 2019-05-16 00:14:53 CEST
Before sunday there will be a release, featuring this patch.
After that, debian maintainers usually provide packages for it soon.
Comment 22 darkshadow8880@gmail.com 2019-05-16 10:46:36 CEST
Thank you for the info Alex!
Comment 23 Git Bot editbugs 2019-05-17 23:14:29 CEST
Theo Linkspfeifer referenced this bugreport in commit 6d5cc5c763c84cab9f3e2cfa558ecc9c788d79e6

Restore right-click drag and drop functionality (Bug #14583)

https://git.xfce.org/xfce/thunar/commit?id=6d5cc5c763c84cab9f3e2cfa558ecc9c788d79e6
Comment 24 Git Bot editbugs 2019-05-17 23:18:39 CEST
Theo Linkspfeifer referenced this bugreport in commit cd18d19d0c308fda60b2df6df72fd95f7d3dd6bd

Restore right-click drag and drop functionality (Bug #14583)

https://git.xfce.org/xfce/thunar/commit?id=cd18d19d0c308fda60b2df6df72fd95f7d3dd6bd
Comment 25 alexxcons editbugs 2019-05-17 23:26:09 CEST
As discussed, I pushed the latest patch, to have the fix in this release.

Works nice thunar-internally. Though right click DnD "thunar --> xfdesktop" or e.g. "thunar --> Nautilus" does not work yet (did work with thunar 1.6.x)  So I will keep the bug open.
Comment 26 Theo Linkspfeifer editbugs 2019-05-18 21:48:24 CEST
Neither does it work for "xfdesktop -> foreign location other than thunar 1.8.5". This means that thunar and xfdesktop share the same problem.

https://git.xfce.org/xfce/xfdesktop/commit/?id=7cfdcad6490b635aaa98a6807eed2b7aec1f529d


The function gdk_drag_context_set_suggested_action() is not available in GTK3 anymore. It is used in the thunar 1.6 code to set the desired drop action.
Comment 27 devicenull2009 2019-07-08 06:05:19 CEST
I am now running Fedora 30 with Thunar version 1.8.6-1 (Xfce 4.13) and all functionality has returned. ie. right click and drag now pops up a menu with "Copy here, Move here, Link here, Cancel" as it used to. Thanks to all developers.
Comment 28 Git Bot editbugs 2020-05-26 23:37:39 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/thunar/-/issues/208.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14583

Reported by:
alexxcons
Reported on: 2018-08-05
Last modified on: 2020-05-26
Duplicates (1):
  • 12348 Drag & drop in detail view: start drag with right click is not possible in name column

People

Assignee:
Xfce Bug Triage
CC List:
9 users

Version

Attachments

screenshot of thunar 1.6.x (12.10 KB, image/png)
2018-08-05 22:44 CEST , alexxcons
no flags
Fix queued context menu popup (14.12 KB, patch)
2019-05-12 01:41 CEST , Theo Linkspfeifer
no flags
Restore right-click drag and drop functionality (3.56 KB, patch)
2019-05-12 01:59 CEST , Theo Linkspfeifer
no flags
Fix queued context menu popup (14.56 KB, patch)
2019-05-12 13:16 CEST , Theo Linkspfeifer
no flags

Additional information