Fix #40059: Use Modifier Keys Between Windows on Win32 #110020

Merged
Harley Acheson merged 1 commits from Harley/blender:Win32WindowModifiers into main 2023-07-12 20:01:43 +02:00
Member

Use modifier keys that are pressed before activating a new window.
Allows call of wm_window_update_eventstate_modifiers on
GHOST_kEventWindowActivate by using GetAsyncKeyState instead of
GetKeyState in GHOST_SystemWin32::getModifierKeys, which retrieves
actual hardware state.


Following shows continuously holding shift and and then ctrl while activating different windows, and properly performing pan and zoom:

Win32Modifiers.gif

This also works correctly when using Alt-Tab to select between apps, without the "stuck key" described in #105381

NOTE: This will probably be merged without a noted reviewer. This is because this PR is a change broken out of #109991. That PR included this functionality when it was approved by @ideasman42

Use modifier keys that are pressed before activating a new window. Allows call of `wm_window_update_eventstate_modifiers` on `GHOST_kEventWindowActivate` by using `GetAsyncKeyState` instead of `GetKeyState` in GHOST_SystemWin32::getModifierKeys, which retrieves actual hardware state. --- Following shows continuously holding shift and and then ctrl while activating different windows, and properly performing pan and zoom: ![Win32Modifiers.gif](/attachments/33776240-b3f8-46d6-859e-d1f8cf5f6681) This also works correctly when using Alt-Tab to select between apps, without the "stuck key" described in #105381 NOTE: This will probably be merged without a noted reviewer. This is because this PR is a change broken out of #109991. That PR included this functionality when it was approved by @ideasman42
Harley Acheson added 1 commit 2023-07-12 19:12:45 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
47592d6907
Fix #40059: Use Modifier Keys Between Windows on Win32
Use modifier keys that are pressed before activating a new window.
Allows call of `wm_window_update_eventstate_modifiers` on
`GHOST_kEventWindowActivate` by using `GetAsyncKeyState` instead of
`GetKeyState` in GHOST_SystemWin32::getModifierKeys, which retrieves
actual hardware state.
Harley Acheson added this to the Platforms, Builds Tests & Devices project 2023-07-12 19:13:02 +02:00
Author
Member

@blender-bot build windows

@blender-bot build windows
Harley Acheson merged commit b7a119c785 into main 2023-07-12 20:01:43 +02:00
Harley Acheson deleted branch Win32WindowModifiers 2023-07-12 20:01:44 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#110020
No description provided.