Page MenuHome

Fix T85113: Pie menu stuck after app loses focus
Needs ReviewPublic

Authored by Chris Cavalluzzi (chriscavalluzzi) on Mar 23 2021, 4:36 PM.

Details

Summary

Occurred when the pie menu key was released after the app lost focus.


This bug occurred when the pie menu key was released after the application window had lost focus, keeping the pie menu stuck open. This change cancels the pie menu and releases the event lock when the application loses focus.

Tested fix on the following pie menus:

  • Mode (Tab)
  • Shading (Z)
  • Pivot Point (.)
  • Orientation (,)
  • Snap (Shift+S)

Note: There are references to "nested" pie menus in related code, but I was unable to find an example of a nested pie menu. If anyone has an example of one, I can test to verify this operates correctly in the second tier of a nested menu.

The video below demonstrates the difference between the existing behavior (left) and the new behavior (right). Note that in the new version, the pie menu disappears when the application loses focus. Unfortunately, I couldn't find an addon that would show my keypresses while the pie menu lock was active, but I was attempting to close the locked-open pie menu by clicking in different places.

(This is my first code submission, so I apologize if anything was handled incorrectly!)

Diff Detail

Repository
rB Blender
Branch
pie-menu-cancel-on-focus-loss (branched from master)
Build Status
Buildable 13683
Build 13683: arc lint + arc unit