archcraft-os / archcraft-openbox

// Configuration : Openbox
GNU General Public License v3.0
101 stars 15 forks source link

Fixed powermenu closing confirm dialog on double click #7

Closed antoine-hnkx closed 2 years ago

antoine-hnkx commented 2 years ago

Issue

When selecting an option from the power menu with the mouse (using double click), the confirm dialog appears to not open (in reality it is opened but closes immediately)

Basically this is the timeline: => left click down => left click up => left click down (double click registered, opening dialog) => left click up (dialog closes because it thinks the user clicked outside of the dialog)

Solution

I added a small delay of 100ms just after selecting an option, this gives enough time for the release of the second mouse click and prevents rofi from thinking the user clicked outside of the confirm dialog.

This doesn't affect selection with keyboard (arrows + enter) and the delay is practically unnoticeable

This problem was mentionned in issue archcraft#35

antoine-hnkx commented 2 years ago

I'm closing this issue, after some more tinkering I found a better solution by changing the rofi config in archcraft-skeleton repo. This is the new PR: archcraft-skeleton#1