After some testing with "xev", I discovered this...
The problem seems to be how the system records the relese botton event. Because when this behavior is happening the system reacts like this:
When I press the button of the mouse, there is this event:
ButtonPress event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5475266, (95,104), root:(101,157),
state 0x10, button 3, same_screen YES
When I release the buttons of the mouse, this is what XEV records:
ButtonRelease event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476162, (95,104), root:(101,157),
state 0x410, button 3, same_screen YES
ButtonPress event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476175, (95,104), root:(101,157),
state 0x10, button 3, same_screen YES
ButtonRelease event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476188, (95,104), root:(101,157),
state 0x410, button 3, same_screen YES
I'm assuming this is not an hardware problem because it doesn't happen on other operating systems, but I will try to make some tests with a different mouse to determine if this is a problem with my mouse, or a bug in Ubuntu.
After some testing with "xev", I discovered this...
The problem seems to be how the system records the relese botton event. Because when this behavior is happening the system reacts like this:
When I press the button of the mouse, there is this event:
ButtonPress event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5475266, (95,104), root:(101,157),
state 0x10, button 3, same_screen YES
When I release the buttons of the mouse, this is what XEV records:
ButtonRelease event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476162, (95,104), root:(101,157),
state 0x410, button 3, same_screen YES
ButtonPress event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476175, (95,104), root:(101,157),
state 0x10, button 3, same_screen YES
ButtonRelease event, serial 35, synthetic NO, window 0x3e00001,
root 0x13c, subw 0x0, time 5476188, (95,104), root:(101,157),
state 0x410, button 3, same_screen YES
I'm assuming this is not an hardware problem because it doesn't happen on other operating systems, but I will try to make some tests with a different mouse to determine if this is a problem with my mouse, or a bug in Ubuntu.