Lock Chrome's Picture-in-Picture window — no clicks, no dragging, no resizing.
- AutoHotkey v2 (Download → v2.x)
Double-click pip_blocker.ahk. A tray icon will appear in the system tray.
- Open a PiP window in Chrome (click the media icon in the toolbar → Picture in Picture)
- Press Ctrl+Shift+P (auto-detect)
- Note: If auto-detect fails on custom websites, click the PiP window to make it active and press Ctrl+Shift+L to force-lock it.
- The PiP window is now fully locked:
- All mouse clicks pass through it to whatever is underneath
- The window cannot be moved or resized
- The video continues playing normally
- Press Ctrl+Shift+P (or Ctrl+Shift+L) again to restore normal behavior
| Hotkey | Action |
|---|---|
Ctrl + Shift + P |
Toggle lock / unlock (Auto-detect PiP) |
Ctrl + Shift + L |
Toggle lock / unlock on the CURRENTLY ACTIVE window (Force) |
Ctrl + Shift + F |
Debug — show info about the detected PiP window |
Uses the Windows API (SetWindowLong) to apply two extended window style flags:
WS_EX_LAYERED+WS_EX_TRANSPARENT— all mouse events pass through the window to whatever is beneath itWS_THICKFRAMEremoved — disables resizing- A 150 ms timer continuously resets the window's position and size if anything tries to move it
The PiP window is detected automatically by scanning Chrome_WidgetWin_1 windows and scoring them based on title, size, aspect ratio, and always-on-top status.
- Chrome's hover controls (play/pause/close overlay) are also unreachable while locked — which is the intended behavior.
- If the detected window is wrong, press
Ctrl+Shift+Fto see which window the script found.