Page MenuHome

UX: Prevent click-through panels and used header area
ClosedPublic

Authored by Julian Eisel (Severin) on Dec 10 2021, 6:47 PM.
Tokens
"Love" token, awarded by PrettyFireNOI7."Like" token, awarded by AlexeyAdamitsky."Love" token, awarded by Raimund58."Love" token, awarded by hitrpr."Love" token, awarded by pablovazquez."Love" token, awarded by billreynish.

Details

Summary

Does two main changes:

  • Handle regions in the order as visible on screen. Practically this just means handling overlapping regions before non-overlapping ones.
  • Don't handle any other regions after having found one containing the mouse pointer.

Like T92364 suggests, this patch changes the clickable area from this:

To almost exactly this:


The Move Orientation: labels on the left of the 3D View tool header can still be clicked through in this patch, otherwise it seems to match.


Fixes T94016, T91538, T91579, T71899.

Diff Detail

Repository
rB Blender
Branch
temp-click-through-fix (branched from master)
Build Status
Buildable 20168
Build 20168: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Dec 10 2021, 6:47 PM
Julian Eisel (Severin) created this revision.
  • Fix missing HANDLED return value print in debug prints
Julian Eisel (Severin) added inline comments.
source/blender/windowmanager/intern/wm_event_system.c
636–647

This sanity check can(/should) be a separate patch. It was used in an earlier version but isn't really needed anymore. I'd still like to add it.

Julian Eisel (Severin) edited the summary of this revision. (Show Details)Dec 10 2021, 7:11 PM
Julian Eisel (Severin) edited the summary of this revision. (Show Details)
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/windowmanager/intern/wm_event_system.c
641

Just passing through and curious-- is there any particular reason to use BLI_INLINE here? I assumed we left that complexity to when it provides a real benefit.

source/blender/windowmanager/intern/wm_event_system.c
641

Since this is really a debug-only check, the extra function call would be a waste of CPU cycles in release builds. I'd be disappointed if compilers didn't already optimize this out, but yeaaah :) So BLI_INLINE is just to enforce that, but no strong feelings about it, we can probably trust compilers to figure this out.

  • Add missing null-check
  • Fix possible parallel execution of window and region handlers
  • Merge branch 'master'

This is great! From my tests in several layouts it seems to work as expected. There might be corner cases though so better get it in before/early bcon3.

Here's a quick video, left side is master, right is this patch:

Two more reports fixed by this patch T91579, T71899.

This seems fine, in some cases the margins seem a bit large (lower part of the toolbar for e.g.) but this can be tweaked separately.

Ran into some issues with asserting when opening new files and pressing keys fast, noted inline.

These should be straightforward to solve, so accepting the patch.

source/blender/windowmanager/intern/wm_event_system.c
643

This is asserting is you press multiple keys at once, it's difficult to redo, pressing sdf and xcv keys in edit-mesh can sometimes redo it.

This can be triggered using the following test:

../lib/tests/ui_simulate/run.py --blender='./blender.bin -d --log "ed.undo.*" --log-level 1 --log-show-basename' --tests "test_undo.view3d_mesh_edit_separate"

3135

This is crashing on making a new file, checking if CTX_wm_window(C) isn't NULL resolves.

This revision is now accepted and ready to land.Jan 27 2022, 3:39 PM
  • Fix incorrect sanity check for "always pass" events
  • Fix another failed assert when opening files