Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🚫 PiP Click Blocker

Lock Chrome's Picture-in-Picture window — no clicks, no dragging, no resizing.


Requirements


Installation

Double-click pip_blocker.ahk. A tray icon will appear in the system tray.


Usage

  1. Open a PiP window in Chrome (click the media icon in the toolbar → Picture in Picture)
  2. 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.
  3. 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
  4. Press Ctrl+Shift+P (or Ctrl+Shift+L) again to restore normal behavior

Hotkeys

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

How It Works

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 it
  • WS_THICKFRAME removed — 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.


Limitations

  • 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+F to see which window the script found.

About

Block all interactions on Chrome's Picture-in-Picture window — no clicks, no dragging, no resizing.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages