Architecture Overview

How XDragMover turns a modifier+click gesture into a moved or resized window, entirely through public and lightly-private macOS APIs.

Pipeline

XDragMover runs as a background menu bar app that installs a global event monitor via the Quartz Event Services API, watching modifier-key and mouse state system-wide. When a qualifying gesture is detected, it resolves the target window through the macOS Accessibility API and drives its position or frame directly.

Global Event Monitor Quartz Event Services
Event Tap Move / Resize / Focus taps
Controller Gesture & exclusion logic
Accessibility API AXUIElement position / size
Target Window Any other app's window

A shared AppSettings layer (backed by UserDefaults) feeds the active modifier, dwell delay and exclusion patterns into every tap/controller pair live, so changes in Settings apply immediately — no restart required. A StatusMenuController supplies the menu bar item and Settings/Debug windows around this core pipeline.

Stages in detail

Permissions

Because it observes input events system-wide and repositions windows belonging to other applications, XDragMover requires the Accessibility permission (System Settings → Privacy & Security → Accessibility), granted once on first launch. No other special entitlements, kernel extensions, or background daemons are used.

← Back to Home