mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-14 12:46:05 +00:00
51 lines
No EOL
2 KiB
Bash
Executable file
51 lines
No EOL
2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Test script to verify display coordinate fixes
|
|
# This script helps test the calculateClickLocation improvements
|
|
|
|
echo "🧪 Testing Display Coordinate Fixes"
|
|
echo "================================="
|
|
echo ""
|
|
echo "This script will help test the improved display coordinate handling in ScreencapService"
|
|
echo ""
|
|
|
|
# Test with Y-flipping enabled (default)
|
|
echo "1. Testing with Y-flipping ENABLED (default behavior):"
|
|
echo " Run VibeTunnel and observe the console logs when clicking"
|
|
echo ""
|
|
|
|
# Test with Y-flipping disabled
|
|
echo "2. Testing with Y-flipping DISABLED:"
|
|
echo " Run with: VIBETUNNEL_FLIP_Y=false /path/to/VibeTunnel.app/Contents/MacOS/VibeTunnel"
|
|
echo ""
|
|
|
|
# Test with warp cursor
|
|
echo "3. Testing with CGWarpMouseCursorPosition:"
|
|
echo " Run with: VIBETUNNEL_USE_WARP=true /path/to/VibeTunnel.app/Contents/MacOS/VibeTunnel"
|
|
echo ""
|
|
|
|
# Combined test
|
|
echo "4. Testing with both options:"
|
|
echo " Run with: VIBETUNNEL_FLIP_Y=false VIBETUNNEL_USE_WARP=true /path/to/VibeTunnel.app/Contents/MacOS/VibeTunnel"
|
|
echo ""
|
|
|
|
echo "What to look for in the logs:"
|
|
echo "- '🔍 [DEBUG] === SCDisplay Information ===' shows all SCDisplay info"
|
|
echo "- '🔍 [DEBUG] === NSScreen Information ===' shows all NSScreen info"
|
|
echo "- '✅ [DEBUG] Matched SCDisplay X with NSScreen Y' shows successful matching"
|
|
echo "- '⚠️ [DEBUG] Position mismatch' indicates displays are indexed differently"
|
|
echo "- '🔧 [DEBUG] Clamped coordinates' indicates coordinates fell outside bounds"
|
|
echo ""
|
|
|
|
echo "Expected improvements:"
|
|
echo "1. Better logging of display matching between SCDisplay and NSScreen"
|
|
echo "2. Fallback matching by size when position doesn't match"
|
|
echo "3. Coordinate validation and clamping to ensure clicks stay within bounds"
|
|
echo "4. Clear indication when display indexing differs between APIs"
|
|
echo ""
|
|
|
|
echo "To test multi-monitor setups:"
|
|
echo "1. Connect multiple displays"
|
|
echo "2. Try capturing display at index 2"
|
|
echo "3. Click on the screen and check if coordinates are correctly calculated"
|
|
echo "4. Look for any negative coordinates or out-of-bounds warnings" |