tiling drag: only start when there are drop targets (#5213)

This prevents potentially confusing drag & drop on fullscreen containers and
only-containers on workspaces.

fixes https://github.com/i3/i3/issues/5184
This commit is contained in:
Michael Stapelberg
2022-10-18 22:10:03 +02:00
committed by GitHub
parent 941229ee62
commit 5e759ed424
4 changed files with 76 additions and 18 deletions

View File

@ -9,6 +9,8 @@
*/
#pragma once
#include "all.h"
/**
* Tiling drag initiation modes.
*/
@ -19,6 +21,13 @@ typedef enum {
TILING_DRAG_MODIFIER_OR_TITLEBAR = 3
} tiling_drag_t;
/**
* Returns whether there currently are any drop targets.
* Used to only initiate a drag when there is something to drop onto.
*
*/
bool has_drop_targets(void);
/**
* Initiates a mouse drag operation on a tiled window.
*