! 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 !
Single-click mode executes twice
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description ToZ editbugs 2017-11-19 23:14:04 CET
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.
Comment 1 Skunnyk editbugs 2017-11-28 23:37:03 CET
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.
Comment 2 Skunnyk editbugs 2017-12-03 19:28:17 CET
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.
Comment 3 vladimir 2018-05-02 07:24:35 CEST
*** Bug 14353 has been marked as a duplicate of this bug. ***
Comment 4 alexxcons editbugs 2018-05-23 22:08:58 CEST
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!
Comment 5 Andre Miranda editbugs 2018-05-24 03:09:29 CEST
Looks good to me.
Comment 6 ToZ editbugs 2018-05-24 03:43:15 CEST
Fixes it for me as well. Thanks.
Comment 7 alexxcons editbugs 2018-05-24 08:56:30 CEST
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.
Comment 8 Git Bot editbugs 2018-05-24 21:43:01 CEST
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

Bug #14021

Reported by:
ToZ
Reported on: 2017-11-19
Last modified on: 2018-05-24
Duplicates (1):
  • 14353 The opening does not work correctly with a single click on the desktop

People

Assignee:
alexxcons
CC List:
4 users

Version

Version:
4.13.1

Attachments

fix for the bug (656 bytes, patch)
2018-05-23 22:08 CEST , alexxcons
no flags

Additional information