No keyboard input after enable "Emulate 3 button mouse" #85562

Closed
opened 2021-02-12 00:25:42 +01:00 by Valentin · 17 comments
Member

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.41

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-11 17:37, hash: a608313860
Worked: (newest version of Blender that worked as expected)

Short description of error
No keyboard input after enable "Emulate 3 button mouse"

Exact steps for others to reproduce the error

  • Default blender cube
  • In preference->input->mouse, check or uncheck "emulate 3 Button Mouse"
  • blender does not respond to keyboard input, you're unable to pan the view nor write in fields nor anything

git bisect narrow down to: 1c4ae8a11c

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.41 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-11 17:37, hash: `a608313860` Worked: (newest version of Blender that worked as expected) **Short description of error** No keyboard input after enable "Emulate 3 button mouse" **Exact steps for others to reproduce the error** * Default blender cube * In preference->input->mouse, check or uncheck "emulate 3 Button Mouse" * blender does not respond to keyboard input, you're unable to pan the view nor write in fields nor anything **git bisect narrow down to:** 1c4ae8a11c820e33da7
Author
Member

Added subscriber: @Poulpator

Added subscriber: @Poulpator
Author
Member

Added subscribers: @Harley, @brecht

Added subscribers: @Harley, @brecht
Author
Member

poke @Harley @brecht since you were involved in 1c4ae8a11c

poke @Harley @brecht since you were involved in 1c4ae8a11c820e33da7

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice

Hmm yeah... in my case, even without enabling "emulate 3 Button Mouse", Blender stops responding to keyboard input as soon as I open a new window, like preferences/render etc...

Hmm yeah... in my case, even without enabling "emulate 3 Button Mouse", Blender stops responding to keyboard input as soon as I open a new window, like preferences/render etc...

Added subscriber: @JasonClarke

Added subscriber: @JasonClarke

I'm noticing the same thing, 2.93 doesn't respond to keyboard input after a new window has been opened.

I'm noticing the same thing, 2.93 doesn't respond to keyboard input after a new window has been opened.
Member

Added subscriber: @wannes.malfait

Added subscriber: @wannes.malfait
Member

Yes I can confirm as well. The moment I open up another window (in blender like preferences) no keyboard input is detected, even after closing it. Keyboard input is detected in the preferences window though.

Yes I can confirm as well. The moment I open up another window (in blender like preferences) no keyboard input is detected, even after closing it. Keyboard input is detected in the preferences window though.
Harley Acheson self-assigned this 2021-02-12 16:27:25 +01:00
Member

Will probably just confirm and revert (all or part of) that commit very soon - just woke up. I’m guessing this affects Windows only and is fixed with one line (forcing is_dialog always true). I had been trying to understand a different bad result but so far it had not made sense. This report might help me with that but I don’t want to leave master in this state now that I see the failure is more profound.

Will probably just confirm and revert (all or part of) that commit very soon - just woke up. I’m guessing this affects Windows only and is fixed with one line (forcing is_dialog always true). I had been trying to understand a different bad result but so far it had not made sense. This report might help me with that but I don’t want to leave master in this state now that I see the failure is more profound.
Member

Added subscriber: @PrototypeNM1

Added subscriber: @PrototypeNM1
Member

This appears to be related to a particular section of code run during W32 Window creation. In file GHOST_WindowWin32.cpp, in GHOST_WindowWin32(), at about line 223 there is a section of code:

  if (parentwindow && !dialog) {
    RAWINPUTDEVICE device = {0};
    device.usUsagePage = 0x01; /* usUsagePage & usUsage for keyboard*/
    device.usUsage = 0x06;     /* http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */
    device.dwFlags |=
        RIDEV_INPUTSINK;  // makes WM_INPUT is visible for ghost when has parent window
    device.hwndTarget = m_hWnd;
    RegisterRawInputDevices(&device, 1, sizeof(device));
  }

If that is NOT run, then everything seems to be right with the world. But I'm not (yet) certain of the intention of that code., whether the circumstances have changed, or if it addressed a old issue that was fixed in later OS versions, etc. So I don't know if there are bad effects if it is omitted, even though I have found none so far.

@PrototypeNM1 - can you guess what this code is doing or is supposed to do?

This appears to be related to a particular section of code run during W32 Window creation. In file GHOST_WindowWin32.cpp, in GHOST_WindowWin32(), at about line 223 there is a section of code: ``` if (parentwindow && !dialog) { RAWINPUTDEVICE device = {0}; device.usUsagePage = 0x01; /* usUsagePage & usUsage for keyboard*/ device.usUsage = 0x06; /* http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */ device.dwFlags |= RIDEV_INPUTSINK; // makes WM_INPUT is visible for ghost when has parent window device.hwndTarget = m_hWnd; RegisterRawInputDevices(&device, 1, sizeof(device)); } ``` If that is NOT run, then everything seems to be right with the world. But I'm not (yet) certain of the intention of that code., whether the circumstances have changed, or if it addressed a old issue that was fixed in later OS versions, etc. So I don't know if there are bad effects if it is omitted, even though I have found none so far. @PrototypeNM1 - can you guess what this code is doing or is supposed to do?

It's from 0b03268.

Just remove it if that solves the issue. The RIM_INPUTSINK change from the same commit should also be removed I think.

It's from 0b03268. Just remove it if that solves the issue. The `RIM_INPUTSINK` change from the same commit should also be removed I think.
Member

@brecht - yes. Looking through this, the best way to explain is...

Our problem in getting our windows "on top" in Win32 is because we were only passing the parent handle if "dialog" was true. So there were only two combinations before: (dialog and parentwindow), and (!notdialog and null). So I think that code was never run ever before. Or, more likely, it was added at the the time that "dialog" was added it then became unreachable.

@brecht - yes. Looking through this, the best way to explain is... Our problem in getting our windows "on top" in Win32 is because we were only passing the parent handle if "dialog" was true. So there were only **two** combinations before: (dialog and parentwindow), and (!notdialog and null). So I think that code was never run ever before. Or, more likely, it was added at the the time that "dialog" was added it then became unreachable.
Member

yes, exactly that when looking at that patch from 2011

yes, exactly that when looking at that patch from 2011

This issue was referenced by ba03f7f0b1

This issue was referenced by ba03f7f0b1d0c40acf997749949a0b0efe19e6d0
Member

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Sign in to join this conversation.
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 project
No Assignees
7 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#85562
No description provided.