Reset double click timer on gesture trigger

This commit is contained in:
Ivan Molodetskikh
2024-05-11 11:21:57 +04:00
parent 719270854a
commit 22cdd044d3
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -101,6 +101,9 @@ impl XdgShellHandler for State {
last_cell.set(Some((time, edges)));
if let Some((last_time, last_edges)) = last {
if time.saturating_sub(last_time) <= DOUBLE_CLICK_TIME {
// Allow quick resize after a triple click.
last_cell.set(None);
let intersection = edges.intersection(last_edges);
if intersection.intersects(ResizeEdge::LEFT_RIGHT) {
// FIXME: don't activate once we can pass specific windows to actions.
+3
View File
@@ -1104,6 +1104,9 @@ impl State {
last_cell.set(Some((time, edges)));
if let Some((last_time, last_edges)) = last {
if time.saturating_sub(last_time) <= DOUBLE_CLICK_TIME {
// Allow quick resize after a triple click.
last_cell.set(None);
let intersection = edges.intersection(last_edges);
if intersection.intersects(ResizeEdge::LEFT_RIGHT) {
// FIXME: don't activate once we can pass specific windows