mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
interactive: allow moving horizontally/vertically maximized window
Applies drag resistance unidirectionally for horizontally/vertically maximized windows, allowing them to be dragged without being untiled immediately. When the distance of cursor movement orthogonal to the maximized direction exceeds <resistance><unMaximizeThreshold>. While dragging a horizontally/vertically maximized window, edge/region snapping is disabled to prevent unintentional snapping and overlays. This commit also includes some refactoring to simplify the logic.
This commit is contained in:
parent
2e19bd4d5b
commit
1f1bdad087
11 changed files with 137 additions and 120 deletions
|
|
@ -3,7 +3,12 @@
|
|||
#define LABWC_RESISTANCE_H
|
||||
#include "labwc.h"
|
||||
|
||||
void resistance_move_apply(struct view *view, double *x, double *y);
|
||||
/**
|
||||
* resistance_unsnap_apply() - Apply resistance when dragging a
|
||||
* maximized/tiled window. Returns true when the view needs to be un-tiled.
|
||||
*/
|
||||
bool resistance_unsnap_apply(struct view *view, int *x, int *y);
|
||||
void resistance_move_apply(struct view *view, int *x, int *y);
|
||||
void resistance_resize_apply(struct view *view, struct wlr_box *new_view_geo);
|
||||
|
||||
#endif /* LABWC_RESISTANCE_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue