Files
i3/include/tiling_drag.h
Orestis Floros b1e99d8ff0 Chore: Code cleanup and style improvements (#6516)
This PR is a pure linting and code cleanup effort with no functional
changes, focusing on improving code quality and consistency.

The bulk of the changes involve:

* Code Formatting: The entire codebase was reformatted after updating
our `clang-format` version.
* Compiler Warnings: Addressed `-Wsuggest-attribute` warnings from GCC
by applying `pure`, `const`, and `format` attributes where appropriate.
This helps the compiler with optimizations and bug detection.
*   Code Modernization:
* Variable declarations were moved closer to their first use or into
tighter scopes.
* `memset` calls were replaced with C99 zero-initializers (`= {0}`).
* Redundant `struct` keywords, unnecessary type casts, and some
superfluous `return` statements were removed.
* CI Adjustments: The GitHub Actions workflow was updated to correctly
apply compiler flags for both GCC and Clang.
2025-11-07 09:49:03 +00:00

34 lines
737 B
C

/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved tiling window manager
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
*
* tiling_drag.h: Reposition tiled windows by dragging.
*
*/
#pragma once
/**
* Tiling drag initiation modes.
*/
typedef enum {
TILING_DRAG_OFF = 0,
TILING_DRAG_MODIFIER = 1,
TILING_DRAG_TITLEBAR = 2,
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.
*
*/
void tiling_drag(Con *con, xcb_button_press_event_t *event, bool use_threshold);