aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlers/xdg_shell.rs10
-rw-r--r--src/input/mod.rs10
2 files changed, 18 insertions, 2 deletions
diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs
index b5d2d3c3..33fa9c87 100644
--- a/src/handlers/xdg_shell.rs
+++ b/src/handlers/xdg_shell.rs
@@ -209,8 +209,16 @@ impl XdgShellHandler for State {
// See if we got a double resize-click gesture.
let time = get_monotonic_time();
let last_cell = mapped.last_interactive_resize_start();
- let last = last_cell.get();
+ let mut last = last_cell.get();
last_cell.set(Some((time, edges)));
+
+ // Floating windows don't have either of the double-resize-click gestures, so just allow it
+ // to resize.
+ if mapped.is_floating() {
+ last = None;
+ last_cell.set(None);
+ }
+
if let Some((last_time, last_edges)) = last {
if time.saturating_sub(last_time) <= DOUBLE_CLICK_TIME {
// Allow quick resize after a triple click.
diff --git a/src/input/mod.rs b/src/input/mod.rs
index 9dd86179..d45d0e8a 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -1697,8 +1697,16 @@ impl State {
// FIXME: deduplicate with resize_request in xdg-shell somehow.
let time = get_monotonic_time();
let last_cell = mapped.last_interactive_resize_start();
- let last = last_cell.get();
+ let mut last = last_cell.get();
last_cell.set(Some((time, edges)));
+
+ // Floating windows don't have either of the double-resize-click
+ // gestures, so just allow it to resize.
+ if mapped.is_floating() {
+ last = None;
+ last_cell.set(None);
+ }
+
if let Some((last_time, last_edges)) = last {
if time.saturating_sub(last_time) <= DOUBLE_CLICK_TIME {
// Allow quick resize after a triple click.