Page MenuHome

Viewport panning (with shift) or zoom (with ctrl) not working when another aplication has the focus
Closed, DuplicatePublic

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.93

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: rBbcfdb14560e7

Short description of error
The key combination for viewport panning (shift+middle click) or zooming (ctrl + middle click) does not work if another aplication had the focus before clicking on Blender's viewport.
This is especially annoying when looking at references on a second monitor and then wanting to pan or zoom in the active Camera in Blender, as the camera will change to the perspective and it will just rotate.

Exact steps for others to reproduce the error

  • Any scene. Default scene will work.
  • Have Blender visible on screen, and then use any other program (for example on a second monitor with pureRef, firefox, etc.).
  • Shift + middle click or ctrl + middle click on Blender's viewport directly.

The camera will now rotate (leaving the active camera if it was enabled) instead of panning or zooming.

thanks a lot for your work!

Event Timeline

manu (manukings) updated the task description. (Show Details)

Thanks for the report, but this is not really a bug, it is an operating system behavior for windowed applications.

Events like Shift are only sent to the active window.
So you need to activate the window with the 3D view first to then pan it.

This is common for most windowed applications.
Chrome for example, you can't select a text without activating the window first.

But it has been reported other times (as in T99269: first pan/zoom doesn't get recognized when window isn't active).
And there's a task proposing to change this behavior for Blender. (See D13951: Win32: Auto-Raise and -Focus Windows on Hover).

So perhaps it is worth considering the change further.