input: Add fully configurable trackpad gestures (#11490)
Adds configurable trackpad gestures
This commit is contained in:
parent
378e130f14
commit
81bf4eccba
60 changed files with 2518 additions and 940 deletions
|
|
@ -166,7 +166,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
|||
// otherwise middle of parent if available
|
||||
if (!pWindow->m_isX11) {
|
||||
if (const auto PARENT = pWindow->parent(); PARENT) {
|
||||
*pWindow->m_realPosition = PARENT->m_realPosition->goal() + PARENT->m_realSize->goal() / 2.F - desiredGeometry.size() / 2.F;
|
||||
*pWindow->m_realPosition = PARENT->m_position + PARENT->m_size / 2.F - desiredGeometry.size() / 2.F;
|
||||
pWindow->m_workspace = PARENT->m_workspace;
|
||||
pWindow->m_monitor = PARENT->m_monitor;
|
||||
centeredOnParent = true;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@ enum eRectCorner : uint8_t {
|
|||
CORNER_BOTTOMLEFT = (1 << 3),
|
||||
};
|
||||
|
||||
inline eRectCorner cornerFromBox(const CBox& box, const Vector2D& pos) {
|
||||
const auto CENTER = box.middle();
|
||||
|
||||
if (pos.x < CENTER.x)
|
||||
return pos.y < CENTER.y ? CORNER_TOPLEFT : CORNER_BOTTOMLEFT;
|
||||
return pos.y < CENTER.y ? CORNER_TOPRIGHT : CORNER_BOTTOMRIGHT;
|
||||
}
|
||||
|
||||
enum eSnapEdge : uint8_t {
|
||||
SNAP_INVALID = 0,
|
||||
SNAP_UP = (1 << 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue