Setting single click mode and single-clicking on an icon executes the icon twice. I put in some debugging code and the xfdesktop_icon_view_button_release() function in the xfdesktop-icon-view.c file is called twice when an icon is single clicked.
I can confirm the bug with 4.13 / master DBG[xfdesktop-icon-view.c:1071] xfdesktop_icon_view_focus_in(): GOT FOCUS DBG[xfdesktop-icon-view.c:800] xfdesktop_icon_view_button_press(): entering DBG[xfdesktop-icon-view.c:861] xfdesktop_icon_view_button_press(): setting stuff DBG[xfdesktop-icon-view.c:979] xfdesktop_icon_view_button_release(): entering btn=1 DBG[xfdesktop-icon-view.c:955] xfdesktop_icon_view_clear_drag_event(): unsetting stuff DBG[xfce-desktop.c:1235] xfce_desktop_button_release_event(): entering DBG[xfdesktop-icon-view.c:979] xfdesktop_icon_view_button_release(): entering btn=1 DBG[xfdesktop-icon-view.c:955] xfdesktop_icon_view_clear_drag_event(): unsetting stuff DBG[xfce-desktop.c:1235] xfce_desktop_button_release_event(): entering By setting return TRUE to xfdesktop_icon_view_button_release function, it works as expected (TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.). But I'm not sure it's the good fix because it return FALSE since ages… I confirm it works as expected with 4.12.
After some debugging, I don't understand why xfdesktop_icon_view_button_release is called twice (the event "button-release-event" is triggered twice ?). The return TRUE fix in xfdesktop_icon_view_button_release function works for me.
*** Bug 14353 has been marked as a duplicate of this bug. ***
Created attachment 7737 fix for the bug Attached a fix Got rewarded for looking at the gtk3 doc :) > Returns true to stop other handlers from being invoked for the event. false to propagate the event further. Found here: https://people.gnome.org/~gcampagna/docs/Gtk-3.0/Gtk.Widget-button-release-event.html Seems to have no impact on double-click or right-click, however some testers would be great!
Looks good to me.
Fixes it for me as well. Thanks.
Great! Thanks for testing! I wonder why the bug only appears for single click mode. As well the doc says "other handlers", not the same handler again ... possibly the real bug lies within gtk3. Will add some comment explaining that to the new return value.
Alexander Schwinn referenced this bugreport in commit 47bfaecdfd5c6936d293c86ea0e68fbdadbcde5d Single-click mode executes desktop items twice (Bug #14021) https://git.xfce.org/xfce/xfdesktop/commit?id=47bfaecdfd5c6936d293c86ea0e68fbdadbcde5d